Skip to content

Commit

Permalink
Reverse heuristics to err on the side of caution
Browse files Browse the repository at this point in the history
  • Loading branch information
mbargiel committed Jun 1, 2019
1 parent bea4a39 commit 10b96d3
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions lib/util/stat.js
Expand Up @@ -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
}
Expand Down

0 comments on commit 10b96d3

Please sign in to comment.