Fix moveOrCopyFileWithCollisions() for fse-extra with kludge

This commit is contained in:
Bryan Ashby 2018-06-23 21:03:05 -06:00
parent 359f21914f
commit ff3ab38a7a
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ function moveOrCopyFileWithCollisionHandling(src, dst, operation, cb) {
if(err) {
// for some reason fs-extra copy doesn't pass err.code
// :TODO: this is dangerous: submit a PR to fs-extra to set EEXIST
if('EEXIST' === err.code || 'copy' === operation) {
if('EEXIST' === err.code || 'dest already exists.' === err.message) {
renameIndex += 1;
return cb(null); // keep trying
}