mirror of
https://github.com/borgbackup/borg.git
synced 2026-03-24 19:34:23 -04:00
recreate: fix rechunking dropping all chunks on the floor
This commit is contained in:
parent
b410392899
commit
eb940e6779
2 changed files with 2 additions and 1 deletions
|
|
@ -1528,7 +1528,7 @@ class ArchiveRecreater:
|
|||
# The target.chunker will read the file contents through ChunkIteratorFileWrapper chunk-by-chunk
|
||||
# (does not load the entire file into memory)
|
||||
file = ChunkIteratorFileWrapper(chunk_iterator)
|
||||
return target.chunker.chunkify(file)
|
||||
yield from target.chunker.chunkify(file)
|
||||
else:
|
||||
for chunk in chunk_iterator:
|
||||
yield chunk.data
|
||||
|
|
|
|||
|
|
@ -1823,6 +1823,7 @@ class ArchiverTestCase(ArchiverTestCaseBase):
|
|||
self.cmd('recreate', self.repository_location, '--chunker-params', 'default')
|
||||
self.check_cache()
|
||||
# test1 and test2 do deduplicate after recreate
|
||||
assert int(self.cmd('list', self.repository_location + '::test1', 'input/large_file', '--format={size}'))
|
||||
assert not int(self.cmd('list', self.repository_location + '::test1', 'input/large_file',
|
||||
'--format', '{unique_chunks}'))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue