You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bug is similar to #141 but applies to files.
Before copying a file, ncp first checks whether the target file exists. If it exists (writable is false), ncp will delete it and start copying.
So if 2 calls of ncp(), which copy files to the same directory, executes at almost the same time, the overwritten files in the target directory may be delete twice, and the latter one will throw error.
done!
[
[Error: ENOENT: no such file or directory, unlink '/tmp/testFolder/xxxxx']
[Error: ENOENT: no such file or directory, unlink '/tmp/testFolder/xxxxx']
...
]
done!
The text was updated successfully, but these errors were encountered:
The bug is similar to #141 but applies to files.
Before copying a file, ncp first checks whether the target file exists. If it exists (
writable
isfalse
), ncp will delete it and start copying.ncp/lib/ncp.js
Lines 221 to 229 in 6820b0f
ncp/lib/ncp.js
Lines 84 to 97 in 6820b0f
So if 2 calls of
ncp()
, which copy files to the same directory, executes at almost the same time, the overwritten files in the target directory may be delete twice, and the latter one will throw error.The test case below can reproduce the bug:
The execution result:
The text was updated successfully, but these errors were encountered: