diff --git a/lib/copy-sync/copy-sync.js b/lib/copy-sync/copy-sync.js index 14ad9939..b7cc727f 100644 --- a/lib/copy-sync/copy-sync.js +++ b/lib/copy-sync/copy-sync.js @@ -182,7 +182,11 @@ function checkStats (src, dest) { function checkPaths (src, dest) { const {srcStat, destStat} = checkStats(src, dest) if (destStat.ino && destStat.ino === srcStat.ino) { - throw new Error('Source and destination must not be the same.') + console.warn( + 'Source and destination must not be the same.', + 'Dest Inode: ' + destStat.ino, + 'Src Inode: ' + srcStat.ino + ) } if (srcStat.isDirectory() && isSrcSubdir(src, dest)) { throw new Error(`Cannot copy '${src}' to a subdirectory of itself, '${dest}'.`) diff --git a/lib/copy/copy.js b/lib/copy/copy.js index 3dfbc540..be05f6be 100644 --- a/lib/copy/copy.js +++ b/lib/copy/copy.js @@ -234,7 +234,11 @@ function checkPaths (src, dest, cb) { if (err) return cb(err) const {srcStat, destStat} = stats if (destStat.ino && destStat.ino === srcStat.ino) { - return cb(new Error('Source and destination must not be the same.')) + console.warn( + 'Source and destination must not be the same.', + 'Dest Inode: ' + destStat.ino, + 'Src Inode: ' + srcStat.ino + ) } if (srcStat.isDirectory() && isSrcSubdir(src, dest)) { return cb(new Error(`Cannot copy '${src}' to a subdirectory of itself, '${dest}'.`))