From 52a72cf73a0d5f9354f100a23c4acd9c30069cc6 Mon Sep 17 00:00:00 2001 From: Marian Beermann Date: Sun, 17 Jul 2016 19:13:09 +0200 Subject: [PATCH] Fix some item subscripts that came from 1.0-maint --- src/borg/archive.py | 2 +- src/borg/archiver.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/borg/archive.py b/src/borg/archive.py index b4572772d..e45655153 100644 --- a/src/borg/archive.py +++ b/src/borg/archive.py @@ -429,7 +429,7 @@ Number of files: {0.stats.nfiles}'''.format( sys.stdout.buffer.flush() if has_damaged_chunks: logger.warning('File %s has damaged (all-zero) chunks. Try running borg check --repair.' % - remove_surrogates(item[b'path'])) + remove_surrogates(item.path)) return original_path = original_path or item.path diff --git a/src/borg/archiver.py b/src/borg/archiver.py index 701ddf351..039071930 100644 --- a/src/borg/archiver.py +++ b/src/borg/archiver.py @@ -446,7 +446,7 @@ class Archiver: try: archive.extract_item(dir_item, stdout=stdout) except BackupOSError as e: - self.print_warning('%s: %s', remove_surrogates(dir_item[b'path']), e) + self.print_warning('%s: %s', remove_surrogates(dir_item.path), e) if output_list: logging.getLogger('borg.output.list').info(remove_surrogates(orig_path)) try: @@ -468,7 +468,7 @@ class Archiver: try: archive.extract_item(dir_item) except BackupOSError as e: - self.print_warning('%s: %s', remove_surrogates(dir_item[b'path']), e) + self.print_warning('%s: %s', remove_surrogates(dir_item.path), e) for pattern in include_patterns: if pattern.match_count == 0: self.print_warning("Include pattern '%s' never matched.", pattern)