From c912fed55d94c9bef2d541cd55f458b12172941c Mon Sep 17 00:00:00 2001 From: Jermolene Date: Wed, 20 Aug 2014 10:11:40 +0100 Subject: [PATCH] Use a JSON tiddler for $:/config/OriginalTiddlerPaths Otherwise things go wrong when we have tiddler titles containing colons --- boot/boot.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/boot/boot.js b/boot/boot.js index d417f3ae1..a28aab306 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -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);