diff --git a/lib/ncp.js b/lib/ncp.js index bc25a05..3d9f6fa 100644 --- a/lib/ncp.js +++ b/lib/ncp.js @@ -225,11 +225,12 @@ function ncp (source, dest, options, callback) { function isWritable(path, done) { fs.lstat(path, function (err) { - if (err) { - if (err.code === 'ENOENT') return done(true); - return done(false); - } - return done(false); + var result; + + if (err && err.code === 'ENOENT') + result = true; + + done(result); }); }