1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-24 00:50:28 +00:00

Fixed mis-renaming of tiddlywiki.files

This commit is contained in:
Jeremy Ruston 2012-08-31 15:09:33 +01:00
parent ed3a10f043
commit 7a15b6f97a
3 changed files with 3 additions and 3 deletions

View File

@ -661,9 +661,9 @@ $tw.loadTiddlersFromFolder = function(filepath,basetitle,excludeRegExp,isShadow)
// Look for a tiddlywiki.files file
if(files.indexOf("tiddlywiki.files") !== -1) {
// If so, process the files it describes
var pluginInfo = JSON.parse(fs.readFileSync(filepath + "/tiddlywiki.files").toString("utf8"));
for(var p=0; p<pluginInfo.tiddlers.length; p++) {
var tidInfo = pluginInfo.tiddlers[p],
var filesInfo = JSON.parse(fs.readFileSync(filepath + "/tiddlywiki.files").toString("utf8"));
for(var p=0; p<filesInfo.tiddlers.length; p++) {
var tidInfo = filesInfo.tiddlers[p],
typeInfo = $tw.config.contentTypeInfo[tidInfo.fields.type || "text/plain"],
text = fs.readFileSync(path.resolve(filepath,tidInfo.file)).toString(typeInfo ? typeInfo.encoding : "utf8");
$tw.wiki.addTiddler(new $tw.Tiddler({text: text},tidInfo.fields),isShadow);