1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-25 17:27:31 +00:00

some micro-opts in stat_ext_attrs

This commit is contained in:
Thomas Waldmann 2021-02-16 22:24:11 +01:00
parent 1b65db990d
commit d4971e2819

View file

@ -1079,13 +1079,9 @@ def stat_simple_attrs(self, st):
def stat_ext_attrs(self, st, path, fd=None): def stat_ext_attrs(self, st, path, fd=None):
attrs = {} attrs = {}
flags = 0
xattrs = {}
with backup_io('extended stat'): with backup_io('extended stat'):
if not self.noflags: flags = 0 if self.noflags else get_flags(path, st, fd=fd)
flags = get_flags(path, st, fd=fd) xattrs = {} if self.noxattrs else xattr.get_all(fd or path, follow_symlinks=False)
if not self.noxattrs:
xattrs = xattr.get_all(fd or path, follow_symlinks=False)
if not self.noacls: if not self.noacls:
acl_get(path, attrs, st, self.numeric_owner, fd=fd) acl_get(path, attrs, st, self.numeric_owner, fd=fd)
if xattrs: if xattrs: