Browse Source

extract: add generic exception handler when setting xattrs, fixes #5092

emit a warning message giving the path, xattr key and error message.

also: continue trying to restore other xattrs and bsdflags afterwards
(it did not continue with this before this fix).
Thomas Waldmann 4 years ago
parent
commit
8875eb9d48
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/borg/archive.py

+ 2 - 1
src/borg/archive.py

@@ -791,7 +791,8 @@ Utilization of max. archive size: {csize_max:.0%}
                         path, k.decode(), len(v)))
                     set_ec(EXIT_WARNING)
                 else:
-                    raise
+                    logger.warning('%s: when setting extended attribute %s: %s' % (path, k.decode(), str(e)))
+                    set_ec(EXIT_WARNING)
         # bsdflags include the immutable flag and need to be set last:
         if not self.nobsdflags and 'bsdflags' in item:
             try: