動かざることバグの如し

近づきたいよ 君の理想に

Owncloudは同期除外するファイルの指定ができない産廃

動機

拡張子「.cache」のファイルの同期をさせたくないと思った

一応設定項目はある

owncloud/config/config.sample.phpを参照すればわかるけど、

/**
 * Blacklist a specific file or files and disallow the upload of files
 * with this name. ``.htaccess`` is blocked by default.
 * WARNING: USE THIS ONLY IF YOU KNOW WHAT YOU ARE DOING.
 */
'blacklisted_files' => array('.htaccess'),

と記述すると「.htaccess」は弾ける模様 じゃあ「.cache」ファイルは

# NG
'blacklisted_files' => array('*.cache'),

ってすればええんやなって思ったけど無理っぽい

そーす

owncloud\lib\private\files\filesystem.phpの545行目付近

static public function isFileBlacklisted($filename) {
    $filename = self::normalizePath($filename);
    $blacklist = \OC_Config::getValue('blacklisted_files', array('.htaccess'));
    $filename = strtolower(basename($filename));
    return in_array($filename, $blacklist);
}

in_arrayは正規表現不可なのでつまり