diff --git a/lib/copy/ncp.js b/lib/copy/ncp.js index a9510047..b6192721 100644 --- a/lib/copy/ncp.js +++ b/lib/copy/ncp.js @@ -107,7 +107,7 @@ function ncp (source, dest, options, callback) { }) } - writeStream.once('finish', function () { + writeStream.once('close', function () { fs.chmod(target, file.mode, function (err) { if (err) return onError(err) if (preserveTimestamps) {