mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-26 19:47:20 +00:00
Use a JSON tiddler for $:/config/OriginalTiddlerPaths
Otherwise things go wrong when we have tiddler titles containing colons
This commit is contained in:
parent
1075bd2084
commit
c912fed55d
@ -1593,11 +1593,11 @@ $tw.loadWikiTiddlers = function(wikiPath,parentPaths) {
|
||||
// Save the original tiddler file locations if requested
|
||||
var config = wikiInfo.config || {};
|
||||
if(config["retain-original-tiddler-path"]) {
|
||||
var output = [];
|
||||
var output = {};
|
||||
for(var title in $tw.boot.files) {
|
||||
output.push(title + ": " + path.relative(resolvedWikiPath,$tw.boot.files[title].filepath) + "\n");
|
||||
output[title] = path.relative(resolvedWikiPath,$tw.boot.files[title].filepath);
|
||||
}
|
||||
$tw.wiki.addTiddler({title: "$:/config/OriginalTiddlerPaths", type: "application/x-tiddler-dictionary", text: output.join("")});
|
||||
$tw.wiki.addTiddler({title: "$:/config/OriginalTiddlerPaths", type: "application/json", text: JSON.stringify(output)});
|
||||
}
|
||||
// Save the path to the tiddlers folder for the filesystemadaptor
|
||||
$tw.boot.wikiTiddlersPath = path.resolve($tw.boot.wikiPath,config["default-tiddler-location"] || $tw.config.wikiTiddlersSubDir);
|
||||
|
Loading…
Reference in New Issue
Block a user