Fix accidental inconsistency between savetiddlers and rendertiddlers

“-do-not-delete” flag for savetiddlers command was introduced in 5.1.10
without consistency with the already implemented “noclean” flag for the
rendertiddlers command
This commit is contained in:
Jermolene
2015-09-29 17:04:01 +01:00
parent 7b8928886b
commit 814353d8ce
6 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ Command.prototype.execute = function() {
pathname = path.resolve(outputPath,this.params[2]),
type = this.params[3] || "text/html",
extension = this.params[4] || ".html",
deleteDirectory = (this.params[5] || "") != "noclean",
deleteDirectory = (this.params[5] || "").toLowerCase() !== "noclean",
tiddlers = wiki.filterTiddlers(filter);
if(deleteDirectory) {
$tw.utils.deleteDirectory(pathname);
+2 -2
View File
@@ -35,9 +35,9 @@ Command.prototype.execute = function() {
wiki = this.commander.wiki,
filter = this.params[0],
pathname = path.resolve(this.commander.outputPath,this.params[1]),
dontDelete = (this.params[2] || "").toLowerCase() === "-do-not-delete",
deleteDirectory = (this.params[2] || "").toLowerCase() !== "noclean",
tiddlers = wiki.filterTiddlers(filter);
if(!dontDelete) {
if(deleteDirectory) {
$tw.utils.deleteDirectory(pathname);
}
$tw.utils.createDirectory(pathname);