From 876c08f654de57276846db56a1f95929f73a0c01 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sat, 23 Sep 2023 13:41:46 +0200 Subject: [PATCH] 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. --- src/borg/archive.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/borg/archive.py b/src/borg/archive.py index 891a16222..8da51b22d 100644 --- a/src/borg/archive.py +++ b/src/borg/archive.py @@ -1056,8 +1056,11 @@ Duration: {0.duration} try: self.cache.chunk_decref(id, size, stats, wait=False) 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: fetch_async_response(wait=False)