mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-06 04:37:12 +02:00
Fix moveOrCopyFileWithCollisions() for fse-extra with kludge
This commit is contained in:
parent
359f21914f
commit
ff3ab38a7a
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue