mirror of https://github.com/borgbackup/borg.git
Merge pull request #4616 from ThomasWaldmann/fix-4607-extract-hl-crash-master
extract: fix KeyError for "partial" extraction, fixes #4607 (master fwd port)
This commit is contained in:
commit
b989b66584
|
@ -258,6 +258,7 @@ class DownloadPipeline:
|
||||||
Warning: if *preload* is True then all data chunks of every yielded item have to be retrieved,
|
Warning: if *preload* is True then all data chunks of every yielded item have to be retrieved,
|
||||||
otherwise preloaded chunks will accumulate in RemoteRepository and create a memory leak.
|
otherwise preloaded chunks will accumulate in RemoteRepository and create a memory leak.
|
||||||
"""
|
"""
|
||||||
|
masters_preloaded = set()
|
||||||
unpacker = msgpack.Unpacker(use_list=False)
|
unpacker = msgpack.Unpacker(use_list=False)
|
||||||
for data in self.fetch_many(ids):
|
for data in self.fetch_many(ids):
|
||||||
unpacker.feed(data)
|
unpacker.feed(data)
|
||||||
|
@ -279,7 +280,6 @@ class DownloadPipeline:
|
||||||
# selected (== not extracted), we will still need to preload its chunks if a
|
# selected (== not extracted), we will still need to preload its chunks if a
|
||||||
# corresponding hardlink slave is selected (== is extracted).
|
# corresponding hardlink slave is selected (== is extracted).
|
||||||
# due to a side effect of the filter() call, we now have hardlink_masters dict populated.
|
# due to a side effect of the filter() call, we now have hardlink_masters dict populated.
|
||||||
masters_preloaded = set()
|
|
||||||
for item in items:
|
for item in items:
|
||||||
if 'chunks' in item: # regular file, maybe a hardlink master
|
if 'chunks' in item: # regular file, maybe a hardlink master
|
||||||
preload(item.chunks)
|
preload(item.chunks)
|
||||||
|
|
Loading…
Reference in New Issue