kopia lustrzana https://github.com/miklobit/TiddlyWiki5
Fixed mis-renaming of `tiddlywiki.files`
rodzic
ed3a10f043
commit
7a15b6f97a
|
@ -661,9 +661,9 @@ $tw.loadTiddlersFromFolder = function(filepath,basetitle,excludeRegExp,isShadow)
|
||||||
// Look for a tiddlywiki.files file
|
// Look for a tiddlywiki.files file
|
||||||
if(files.indexOf("tiddlywiki.files") !== -1) {
|
if(files.indexOf("tiddlywiki.files") !== -1) {
|
||||||
// If so, process the files it describes
|
// If so, process the files it describes
|
||||||
var pluginInfo = JSON.parse(fs.readFileSync(filepath + "/tiddlywiki.files").toString("utf8"));
|
var filesInfo = JSON.parse(fs.readFileSync(filepath + "/tiddlywiki.files").toString("utf8"));
|
||||||
for(var p=0; p<pluginInfo.tiddlers.length; p++) {
|
for(var p=0; p<filesInfo.tiddlers.length; p++) {
|
||||||
var tidInfo = pluginInfo.tiddlers[p],
|
var tidInfo = filesInfo.tiddlers[p],
|
||||||
typeInfo = $tw.config.contentTypeInfo[tidInfo.fields.type || "text/plain"],
|
typeInfo = $tw.config.contentTypeInfo[tidInfo.fields.type || "text/plain"],
|
||||||
text = fs.readFileSync(path.resolve(filepath,tidInfo.file)).toString(typeInfo ? typeInfo.encoding : "utf8");
|
text = fs.readFileSync(path.resolve(filepath,tidInfo.file)).toString(typeInfo ? typeInfo.encoding : "utf8");
|
||||||
$tw.wiki.addTiddler(new $tw.Tiddler({text: text},tidInfo.fields),isShadow);
|
$tw.wiki.addTiddler(new $tw.Tiddler({text: text},tidInfo.fields),isShadow);
|
||||||
|
|
Ładowanie…
Reference in New Issue