1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-02-23 14:41:43 +00:00

fix double delete in rebuild_refcounts

in case of the Manifest having an IntegrityError,
the entry for the manifest was already deleted.
This commit is contained in:
Thomas Waldmann 2017-06-17 20:17:08 +02:00
parent 72ef24cbc0
commit 726051b9d1

View file

@ -1328,8 +1328,8 @@ def rebuild_refcounts(self, archive=None, first=0, last=0, sort_by='', glob=None
Missing and/or incorrect data is repaired when detected
"""
# Exclude the manifest from chunks
del self.chunks[Manifest.MANIFEST_ID]
# Exclude the manifest from chunks (manifest entry might be already deleted from self.chunks)
self.chunks.pop(Manifest.MANIFEST_ID, None)
def mark_as_possibly_superseded(id_):
if self.chunks.get(id_, ChunkIndexEntry(0, 0, 0)).refcount == 0: