mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-10 20:09:57 +00:00
Fix tiddlywiki editions command (#8535)
This commit is contained in:
parent
3fe66bb80f
commit
999f74ee86
@ -29,10 +29,14 @@ exports.getEditionInfo = function() {
|
|||||||
for(var entryIndex=0; entryIndex<entries.length; entryIndex++) {
|
for(var entryIndex=0; entryIndex<entries.length; entryIndex++) {
|
||||||
var entry = entries[entryIndex];
|
var entry = entries[entryIndex];
|
||||||
// Check if directories have a valid tiddlywiki.info
|
// Check if directories have a valid tiddlywiki.info
|
||||||
if(!editionInfo[entry] && $tw.utils.isDirectory(path.resolve(editionPath,entry))) {
|
// Check if the entry is a hidden directory
|
||||||
var info = $tw.utils.parseJSONSafe(fs.readFileSync(path.resolve(editionPath,entry,"tiddlywiki.info"),"utf8"),null);
|
if((entry.charAt(0) !== ".") && !editionInfo[entry] && $tw.utils.isDirectory(path.resolve(editionPath,entry))) {
|
||||||
if(info) {
|
var file=path.resolve(editionPath,entry,"tiddlywiki.info");
|
||||||
editionInfo[entry] = info;
|
if(fs.existsSync(file)) {
|
||||||
|
var info = $tw.utils.parseJSONSafe(fs.readFileSync(file,"utf8"),null);
|
||||||
|
if(info) {
|
||||||
|
editionInfo[entry] = info;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user