mirror of
https://github.com/borgbackup/borg.git
synced 2026-06-09 08:51:54 -04:00
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.
This commit is contained in:
parent
a4eac0b62c
commit
d8564b90a4
1 changed files with 2 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue