Pass pathFilters as an array (#4174)

* Pass pathFilters as an array

Otherwise, when we try to iterate over pathFilters in the filesystem
utils module, we end up iterating over each character in the filter
string, which ends up generating 'Filter error_ Missing [ in filter
expression.tid' as the tiddler's filename

Fixes GH #4173

* Allow for multiple path filters to be specified

...via $:/config/FileSystemPaths, split by newlines
fix-syncer
Rob Hoelz 2019-08-22 03:24:40 -05:00 zatwierdzone przez Jeremy Ruston
rodzic bab1bca485
commit 0402dbd48d
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -53,7 +53,7 @@ FileSystemAdaptor.prototype.getTiddlerFileInfo = function(tiddler,callback) {
// Otherwise, we'll need to generate it
fileInfo = $tw.utils.generateTiddlerFileInfo(tiddler,{
directory: $tw.boot.wikiTiddlersPath,
pathFilters: this.wiki.getTiddlerText("$:/config/FileSystemPaths"),
pathFilters: this.wiki.getTiddlerText("$:/config/FileSystemPaths","").split("\n"),
wiki: this.wiki
});
$tw.boot.files[title] = fileInfo;