From 10b96d3539968761031dc2a97d982720d1aeaa22 Mon Sep 17 00:00:00 2001 From: Maxime Bargiel Date: Sat, 1 Jun 2019 09:28:25 -0400 Subject: [PATCH] Reverse heuristics to err on the side of caution --- lib/util/stat.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/util/stat.js b/lib/util/stat.js index bf57a1f1..320ec066 100644 --- a/lib/util/stat.js +++ b/lib/util/stat.js @@ -162,16 +162,17 @@ function areApparentlyIdentical (srcStat, destStat) { // Use additional heuristics if we can't use 'bigint'. // Different 'ino' could be represented the same if they are >= Number.MAX_SAFE_INTEGER // See issue 657 - if (destStat.size === srcStat.size && - destStat.mode === srcStat.mode && - destStat.nlink === srcStat.nlink && - destStat.atimeMs === srcStat.atimeMs && - destStat.mtimeMs === srcStat.mtimeMs && - destStat.ctimeMs === srcStat.ctimeMs && - destStat.birthtimeMs === srcStat.birthtimeMs) { + if (destStat.size !== srcStat.size || + destStat.mode !== srcStat.mode || + destStat.nlink !== srcStat.nlink || + destStat.atimeMs !== srcStat.atimeMs || + destStat.mtimeMs !== srcStat.mtimeMs || + destStat.ctimeMs !== srcStat.ctimeMs || + destStat.birthtimeMs !== srcStat.birthtimeMs) { // heuristic answer - return true + return false } + return true } return false }