summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-05-27 13:17:05 +0200
committerSamy Pessé <samypesse@gmail.com>2015-05-27 13:17:05 +0200
commit07785528a5c5d257c980a009009a712b2b42812b (patch)
treed8dc5d59dc20753a420ba8ac6d2f523c5db78394
parenta7d3064340d38529ac37da8cc4475033a7aa0a34 (diff)
parentbb579dd5815c5f98cf57d5a657dbab5bf46db1e6 (diff)
downloadgitbook-07785528a5c5d257c980a009009a712b2b42812b.zip
gitbook-07785528a5c5d257c980a009009a712b2b42812b.tar.gz
gitbook-07785528a5c5d257c980a009009a712b2b42812b.tar.bz2
Merge pull request #767 from wilhelmmatilainen/patch-1
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() {