1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-12-14 04:38:05 +00:00

Fix checking for non-empty folders in initcommand

This commit is contained in:
Jermolene
2014-12-10 22:14:27 +00:00
parent 2698f08851
commit 51db48acc9
2 changed files with 18 additions and 1 deletions

View File

@@ -26,7 +26,7 @@ Command.prototype.execute = function() {
var fs = require("fs"),
path = require("path");
// Check that we don't already have a valid wiki folder
if($tw.boot.wikiTiddlersPath) {
if($tw.boot.wikiTiddlersPath || ($tw.utils.isDirectory($tw.boot.wikiPath) && !$tw.utils.isDirectoryEmpty($tw.boot.wikiPath))) {
return "Wiki folder is not empty";
}
// Loop through each of the specified editions