From c5023da729c3b2ba9c1d8172a2adbb6dd9549584 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Fri, 23 Aug 2024 14:42:37 +0200 Subject: [PATCH] transfer: rather talk of presence than refcount --- src/borg/archiver/transfer_cmd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/borg/archiver/transfer_cmd.py b/src/borg/archiver/transfer_cmd.py index e740908f9..780513e55 100644 --- a/src/borg/archiver/transfer_cmd.py +++ b/src/borg/archiver/transfer_cmd.py @@ -100,8 +100,8 @@ def do_transfer(self, args, *, repository, manifest, cache, other_repository=Non if "chunks" in item: chunks = [] for chunk_id, size in item.chunks: - refcount = cache.seen_chunk(chunk_id, size) - if refcount == 0: # target repo does not yet have this chunk + chunk_present = cache.seen_chunk(chunk_id, size) != 0 + if not chunk_present: # target repo does not yet have this chunk if not dry_run: cdata = other_repository.get(chunk_id) if args.recompress == "never":