diff --git a/lib/ncp.js b/lib/ncp.js index 96eed47..4dc151e 100644 --- a/lib/ncp.js +++ b/lib/ncp.js @@ -94,8 +94,7 @@ function ncp (source, dest, options, callback) { rmFile(target, function () { copyFile(file, target); }); - } - if (modified) { + } else if (modified) { var stat = dereference ? fs.stat : fs.lstat; stat(target, function(err, stats) { //if souce modified time greater to target modified time copy file @@ -103,8 +102,7 @@ function ncp (source, dest, options, callback) { copyFile(file, target); else return cb(); }); - } - else { + } else { return cb(); } });