1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-12-07 01:08:06 +00:00

fix filesystem bugs (#5213)

This commit is contained in:
Joshua Fontany
2020-12-06 01:41:03 -08:00
committed by GitHub
parent a3a7d6450d
commit b0f6d50b60
2 changed files with 30 additions and 22 deletions

View File

@@ -53,11 +53,17 @@ It is the responsibility of the filesystem adaptor to update this.boot.files for
*/
FileSystemAdaptor.prototype.getTiddlerFileInfo = function(tiddler,callback) {
// Always generate a fileInfo object when this fuction is called
var title = tiddler.fields.title, newInfo;
var title = tiddler.fields.title, newInfo, pathFilters, extFilters;
if(this.wiki.tiddlerExists("$:/config/FileSystemPaths")){
pathFilters = this.wiki.getTiddlerText("$:/config/FileSystemPaths","").split("\n");
}
if(this.wiki.tiddlerExists("$:/config/FileSystemExtensions")){
extFilters = this.wiki.getTiddlerText("$:/config/FileSystemExtensions","").split("\n");
}
newInfo = $tw.utils.generateTiddlerFileInfo(tiddler,{
directory: this.boot.wikiTiddlersPath,
pathFilters: this.wiki.getTiddlerText("$:/config/FileSystemPaths","").split("\n"),
extFilters: this.wiki.getTiddlerText("$:/config/FileSystemExtensions","").split("\n"),
pathFilters: pathFilters,
extFilters: extFilters,
wiki: this.wiki,
fileInfo: this.boot.files[title],
originalpath: this.wiki.extractTiddlerDataItem("$:/config/OriginalTiddlerPaths",title, "")