浏览代码

acl_get() and acl_set() should accept a fd. Related to #4403

Fixes:

self = <borg.archive.MetadataCollector object at 0x14ffb70b28d0>
st = os.stat_result(st_mode=16895, st_ino=246007, st_dev=65280, st_nlink=3, st_uid=100
0, st_gid=0, st_size=512, st_atime=1551123978, st_mtime=1551123979, st_ctime=155112397
9)
path = 'input', fd = 16

    def stat_ext_attrs(self, st, path, fd=None):
        attrs = {}
        bsdflags = 0
        with backup_io('extended stat'):
            if not self.nobsdflags:
                bsdflags = get_flags(path, st, fd=fd)
            xattrs = xattr.get_all(fd or path, follow_symlinks=False)
>           acl_get(path, attrs, st, self.numeric_owner, fd=fd)
E           TypeError: acl_get() got an unexpected keyword argument 'fd'

src/borg/archive.py:1023: TypeError
Björn Ketelaars 6 年之前
父节点
当前提交
c5e3f3b4d4
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/borg/platform/base.py

+ 2 - 2
src/borg/platform/base.py

@@ -61,7 +61,7 @@ def setxattr(path, name, value, *, follow_symlinks=False):
     """
 
 
-def acl_get(path, item, st, numeric_owner=False):
+def acl_get(path, item, st, numeric_owner=False, fd=None):
     """
     Saves ACL Entries
 
@@ -69,7 +69,7 @@ def acl_get(path, item, st, numeric_owner=False):
     """
 
 
-def acl_set(path, item, numeric_owner=False):
+def acl_set(path, item, numeric_owner=False, fd=None):
     """
     Restore ACL Entries