Browse Source

process_symlink: fix missing backup_io()

Fixes a chmod/chown/chgrp/unlink/rename/... crash race between getting dirents
and dispatching to process_symlink.
Marian Beermann 8 years ago
parent
commit
f1cf7bc322
1 changed files with 2 additions and 1 deletions
  1. 2 1
      borg/archive.py

+ 2 - 1
borg/archive.py

@@ -610,7 +610,8 @@ Number of files: {0.stats.nfiles}'''.format(
             return 'b'  # block device
             return 'b'  # block device
 
 
     def process_symlink(self, path, st):
     def process_symlink(self, path, st):
-        source = os.readlink(path)
+        with backup_io():
+            source = os.readlink(path)
         item = {b'path': make_path_safe(path), b'source': source}
         item = {b'path': make_path_safe(path), b'source': source}
         item.update(self.stat_attrs(st, path))
         item.update(self.stat_attrs(st, path))
         self.add_item(item)
         self.add_item(item)