From 0402dbd48df33850a8333f870481616ef8a74337 Mon Sep 17 00:00:00 2001 From: Rob Hoelz Date: Thu, 22 Aug 2019 03:24:40 -0500 Subject: [PATCH] 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 --- plugins/tiddlywiki/filesystem/filesystemadaptor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/tiddlywiki/filesystem/filesystemadaptor.js b/plugins/tiddlywiki/filesystem/filesystemadaptor.js index 1b4ddf18f..a346a6606 100644 --- a/plugins/tiddlywiki/filesystem/filesystemadaptor.js +++ b/plugins/tiddlywiki/filesystem/filesystemadaptor.js @@ -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;