From cb2d31ed98ed557cff0436ef9146bb184e504471 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Fri, 23 Aug 2019 00:24:23 +0200 Subject: [PATCH] fix partial extract for hardlinked contentless file types, fixes #4725 if the file is not a regular file, but a hardlink slave with a not extracted hardlink master, chunks will be None and we must not call preload(chunks). (cherry picked from commit 291d58efa1a2ca71b102012309214294cf8e0ec1) --- src/borg/archive.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/borg/archive.py b/src/borg/archive.py index 86e8a62e0..5a5f19d47 100644 --- a/src/borg/archive.py +++ b/src/borg/archive.py @@ -293,7 +293,8 @@ class DownloadPipeline: if source not in masters_preloaded: # we only need to preload *once* (for the 1st selected slave) chunks, _ = hardlink_masters[source] - preload(chunks) + if chunks is not None: + preload(chunks) masters_preloaded.add(source) else: # easy: we do not have a filter, thus all items are selected, thus we need to preload all chunks.