浏览代码

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 年之前
父节点
当前提交
8875eb9d48
共有 1 个文件被更改,包括 2 次插入1 次删除
  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: