From 71c7efd17c987a52ace490a1c20f1ea9b41de063 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Mon, 10 Jun 2019 18:23:28 +0200 Subject: [PATCH] extract: fix KeyError for "partial" extraction, fixes #4607 note that "partial" even applied to giving an always matching condition. "full" is only assumed if no conditions are given. --- src/borg/archive.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/borg/archive.py b/src/borg/archive.py index 5f9cb463e..212fd3bfa 100644 --- a/src/borg/archive.py +++ b/src/borg/archive.py @@ -258,6 +258,7 @@ class DownloadPipeline: 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. """ + masters_preloaded = set() unpacker = msgpack.Unpacker(use_list=False) for data in self.fetch_many(ids): unpacker.feed(data) @@ -279,7 +280,6 @@ class DownloadPipeline: # selected (== not extracted), we will still need to preload its chunks if a # corresponding hardlink slave is selected (== is extracted). # due to a side effect of the filter() call, we now have hardlink_masters dict populated. - masters_preloaded = set() for item in items: if 'chunks' in item: # regular file, maybe a hardlink master preload(item.chunks)