summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilhelm <wilhelm.matilainen@gmail.com>2015-05-27 14:13:02 +0300
committerWilhelm <wilhelm.matilainen@gmail.com>2015-05-27 14:13:02 +0300
commitbb579dd5815c5f98cf57d5a657dbab5bf46db1e6 (patch)
treed8dc5d59dc20753a420ba8ac6d2f523c5db78394
parenta7d3064340d38529ac37da8cc4475033a7aa0a34 (diff)
downloadgitbook-bb579dd5815c5f98cf57d5a657dbab5bf46db1e6.zip
gitbook-bb579dd5815c5f98cf57d5a657dbab5bf46db1e6.tar.gz
gitbook-bb579dd5815c5f98cf57d5a657dbab5bf46db1e6.tar.bz2
Don't create panic by telling about false overwrite
-rw-r--r--lib/book.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/book.js b/lib/book.js
index e61d771..ac0fc82 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() {