mirror of https://github.com/borgbackup/borg.git
micro-opt: get xattrs directly before acls
on linux, acls are based on xattrs, so do these closeby: 1. listxattr -> keys (without acl related keys) 2. for all keys: getxattr 3. acl-related getxattr by acl library
This commit is contained in:
parent
85b711fc88
commit
39922e88e5
|
@ -954,9 +954,9 @@ class MetadataCollector:
|
||||||
attrs = {}
|
attrs = {}
|
||||||
bsdflags = 0
|
bsdflags = 0
|
||||||
with backup_io('extended stat'):
|
with backup_io('extended stat'):
|
||||||
xattrs = xattr.get_all(fd or path, follow_symlinks=False)
|
|
||||||
if not self.nobsdflags:
|
if not self.nobsdflags:
|
||||||
bsdflags = get_flags(path, st, fd=fd)
|
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)
|
acl_get(path, attrs, st, self.numeric_owner, fd=fd)
|
||||||
if xattrs:
|
if xattrs:
|
||||||
attrs['xattrs'] = StableDict(xattrs)
|
attrs['xattrs'] = StableDict(xattrs)
|
||||||
|
|
Loading…
Reference in New Issue