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

@@ -1482,7 +1482,11 @@ func (manager *SnapshotManager) Diff(top string, snapshotID string, revisions []
same = right.IsSameAs(left) same = right.IsSameAs(left)
} }
} else { } else {
same = left.Hash == right.Hash if left.Size == 0 && right.Size == 0 {
same = true
} else {
same = left.Hash == right.Hash
}
} }
if !same { if !same {