diff --git a/lib/util/stat.js b/lib/util/stat.js index 7b8ec937..bf57a1f1 100644 --- a/lib/util/stat.js +++ b/lib/util/stat.js @@ -155,15 +155,14 @@ function checkParentPathsSync (src, srcStat, dest, funcName) { function areApparentlyIdentical (srcStat, destStat) { if (destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev) { - if (nodeSupportsBigInt()) { + if (nodeSupportsBigInt() || destStat.ino < Number.MAX_SAFE_INTEGER) { // definitive answer return true } // Use additional heuristics if we can't use 'bigint'. - // Different 'ino' could be represented the same if they are >= Number.MAX_SAFE_INTEGER + // Different 'ino' could be represented the same if they are >= Number.MAX_SAFE_INTEGER // See issue 657 - if (destStat.ino >= Number.MAX_SAFE_INTEGER && - destStat.size === srcStat.size && + if (destStat.size === srcStat.size && destStat.mode === srcStat.mode && destStat.nlink === srcStat.nlink && destStat.atimeMs === srcStat.atimeMs &&