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
1 changed files with 4 additions and 0 deletions

View File

@ -1030,6 +1030,10 @@ class Archiver:
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: