From 0b00c14c277b6480feb476e90f7ece5cf194ceff Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Tue, 13 Jun 2017 01:12:14 +0200 Subject: [PATCH] don't write to disk with --stdout, fixes #2645 if we always give stdout to extract_item(), it gets into the stdout- processing branch which only emits data from items that have chunks and does nothing for items which don't. --- src/borg/archiver.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/borg/archiver.py b/src/borg/archiver.py index 2138cde92..e4487350e 100644 --- a/src/borg/archiver.py +++ b/src/borg/archiver.py @@ -704,7 +704,7 @@ def peek_and_store_hardlink_masters(item, matched): else: if stat.S_ISDIR(item.mode): dirs.append(item) - archive.extract_item(item, restore_attrs=False) + archive.extract_item(item, stdout=stdout, restore_attrs=False) else: archive.extract_item(item, stdout=stdout, sparse=sparse, hardlink_masters=hardlink_masters, stripped_components=strip_components, original_path=orig_path, pi=pi) @@ -721,7 +721,7 @@ def peek_and_store_hardlink_masters(item, matched): pi.show() dir_item = dirs.pop(-1) try: - archive.extract_item(dir_item) + archive.extract_item(dir_item, stdout=stdout) except BackupOSError as e: self.print_warning('%s: %s', remove_surrogates(dir_item.path), e) for pattern in matcher.get_unmatched_include_patterns():