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
1 changed files with 2 additions and 6 deletions

View File

@ -1079,13 +1079,9 @@ class MetadataCollector:
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: