Prechádzať zdrojové kódy

Fix some item subscripts that came from 1.0-maint

Marian Beermann 9 rokov pred
rodič
commit
52a72cf73a
2 zmenil súbory, kde vykonal 3 pridanie a 3 odobranie
  1. 1 1
      src/borg/archive.py
  2. 2 2
      src/borg/archiver.py

+ 1 - 1
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

+ 2 - 2
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)