diff --git a/lib/copy.js b/lib/copy.js index 416fd14..63dbe3b 100644 --- a/lib/copy.js +++ b/lib/copy.js @@ -335,7 +335,7 @@ function copyFile(srcPath, destPath, stats, options) { mode: stats.mode }); write.on('error', handleCopyFailed); - write.on('finish', function() { + write.on('close', function() { fs.utimes(destPath, stats.atime, stats.mtime, function() { hasFinished = true; resolve();