mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-22 18:43:29 +00:00
Don't create panic by telling about false overwrite
This commit is contained in:
+6
-2
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user