Skip to content

Commit

Permalink
Use writeStream 'finish' event instead of 'close'. Fixes #326
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Santos committed Dec 21, 2016
1 parent 5f319b6 commit 543112b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/copy/ncp.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 543112b

Please sign in to comment.