From d8564b90a4d99fb212aa125c0b798a759e52521e Mon Sep 17 00:00:00 2001 From: Mrityunjay Raj Date: Mon, 1 Jun 2026 23:56:40 +0530 Subject: [PATCH] repository: make N=1 chunk size assumption explicit in list(), refs #8572 info.size is the on-disk pack file size, which equals the chunk size only when N=1 (one chunk per pack). Extract it into a named variable with a comment so the assumption is visible and easy to fix when N>1 is introduced. --- src/borg/repository.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/borg/repository.py b/src/borg/repository.py index db8ed214d..bba937e33 100644 --- a/src/borg/repository.py +++ b/src/borg/repository.py @@ -467,7 +467,8 @@ class Repository: pack_id = hex_to_bin(info.name) chunk_id = pack_id # N=1: chunk_id == pack_id if collect: - result.append((chunk_id, info.size)) + chunk_size = info.size # only correct for N=1 + result.append((chunk_id, chunk_size)) if len(result) == limit: break elif chunk_id == marker: