From bb579dd5815c5f98cf57d5a657dbab5bf46db1e6 Mon Sep 17 00:00:00 2001 From: Wilhelm Date: Wed, 27 May 2015 14:13:02 +0300 Subject: [PATCH] Don't create panic by telling about false overwrite --- lib/book.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/book.js b/lib/book.js index e61d7710b..ac0fc82db 100644 --- a/lib/book.js +++ b/lib/book.js @@ -843,8 +843,12 @@ Book.init = function(root) { return fs.exists(absolutePath) .then(function(exists) { - book.log.info.ln("create", chapter.path); - if(exists) return; + if(exists) { + book.log.info.ln("found", chapter.path); + return; + } else { + book.log.info.ln("create", chapter.path); + } return fs.mkdirp(path.dirname(absolutePath)) .then(function() {