1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-02-12 09:30:27 +00:00

consider an empty file as different to a non-existing file, fixes #3688

This commit is contained in:
Thomas Waldmann 2018-03-17 18:50:51 +01:00
parent 01beee37a7
commit c3b7d7b60c

View file

@ -1030,6 +1030,10 @@ def compare_link(item1, item2):
return 'changed link'
def contents_changed(item1, item2):
if item1.get('deleted') != item2.get('deleted'):
# a deleleted/non-existing file is considered different to an existing file,
# even if the latter is empty.
return True
if can_compare_chunk_ids:
return item1.chunks != item2.chunks
else: