mirror of
https://github.com/borgbackup/borg.git
synced 2025-01-01 04:37:34 +00:00
Merge pull request #3166 from ThomasWaldmann/fix-recreate-part-size-1.1
borg recreate: correctly compute part file sizes, fixes #3157
This commit is contained in:
commit
38b2d064d4
1 changed files with 3 additions and 1 deletions
|
@ -897,7 +897,9 @@ def write_part_file(self, item, from_chunk, number):
|
|||
length = len(item.chunks)
|
||||
# the item should only have the *additional* chunks we processed after the last partial item:
|
||||
item.chunks = item.chunks[from_chunk:]
|
||||
item.get_size(memorize=True)
|
||||
# for borg recreate, we already have a size member in the source item (giving the total file size),
|
||||
# but we consider only a part of the file here, thus we must recompute the size from the chunks:
|
||||
item.get_size(memorize=True, from_chunks=True)
|
||||
item.path += '.borg_part_%d' % number
|
||||
item.part = number
|
||||
number += 1
|
||||
|
|
Loading…
Reference in a new issue