1
0
mirror of https://github.com/gilbertchen/duplicacy synced 2025-12-18 01:03:25 +00:00

Don't compare hashes of empty files in the diff command

Empty files may or may not have a hash depending if the -hash option is used
during backup.
This commit is contained in:
Gilbert Chen
2019-06-06 12:35:34 -04:00
parent eba5aa6eea
commit 9d4ac34f4b

View File

@@ -1481,9 +1481,13 @@ func (manager *SnapshotManager) Diff(top string, snapshotID string, revisions []
} else {
same = right.IsSameAs(left)
}
} else {
if left.Size == 0 && right.Size == 0 {
same = true
} else {
same = left.Hash == right.Hash
}
}
if !same {
LOG_INFO("SNAPSHOT_DIFF", " %s", left.String(maxSizeDigits))