From ff3ab38a7aec01351bf6f81c9b3ffa940b758522 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Sat, 23 Jun 2018 21:03:05 -0600 Subject: [PATCH] Fix moveOrCopyFileWithCollisions() for fse-extra with kludge --- core/file_util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/file_util.js b/core/file_util.js index 64167771..fdea4e45 100644 --- a/core/file_util.js +++ b/core/file_util.js @@ -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 }