فهرست منبع

tolerate missing chunks with delete --force

if a chunk is missing in repo, it will also be missing in a ad-hoc
built chunks index.
Thomas Waldmann 1 سال پیش
والد
کامیت
876c08f654
1فایلهای تغییر یافته به همراه5 افزوده شده و 2 حذف شده
  1. 5 2
      src/borg/archive.py

+ 5 - 2
src/borg/archive.py

@@ -1056,8 +1056,11 @@ Duration: {0.duration}
             try:
             try:
                 self.cache.chunk_decref(id, size, stats, wait=False)
                 self.cache.chunk_decref(id, size, stats, wait=False)
             except KeyError:
             except KeyError:
-                cid = bin_to_hex(id)
-                raise ChunksIndexError(cid)
+                nonlocal error
+                if forced == 0:
+                    cid = bin_to_hex(id)
+                    raise ChunksIndexError(cid)
+                error = True
             else:
             else:
                 fetch_async_response(wait=False)
                 fetch_async_response(wait=False)