diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-05-27 13:17:05 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-05-27 13:17:05 +0200 |
commit | 07785528a5c5d257c980a009009a712b2b42812b (patch) | |
tree | d8dc5d59dc20753a420ba8ac6d2f523c5db78394 /lib/book.js | |
parent | a7d3064340d38529ac37da8cc4475033a7aa0a34 (diff) | |
parent | bb579dd5815c5f98cf57d5a657dbab5bf46db1e6 (diff) | |
download | gitbook-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
Diffstat (limited to 'lib/book.js')
-rw-r--r-- | lib/book.js | 8 |
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() { |