Explorar o código

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

Thomas Waldmann %!s(int64=7) %!d(string=hai) anos
pai
achega
c3b7d7b60c
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      src/borg/archiver.py

+ 4 - 0
src/borg/archiver.py

@@ -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: