1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 10:07:19 +00:00

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
This commit is contained in:
Rob Hoelz 2019-08-22 03:24:40 -05:00 committed by Jeremy Ruston
parent bab1bca485
commit 0402dbd48d

View File

@ -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;