wrap get_flags with backup_io

This commit is contained in:
Marian Beermann 2016-07-08 13:26:06 +02:00
parent fe627246e4
commit aade62c9f9
No known key found for this signature in database
GPG Key ID: 9B8450B91D1362C1
2 changed files with 8 additions and 5 deletions

View File

@ -657,13 +657,12 @@ Number of files: {0.stats.nfiles}'''.format(
attrs['user'] = attrs['group'] = None
with backup_io():
xattrs = xattr.get_all(path, follow_symlinks=False)
bsdflags = get_flags(path, st)
acl_get(path, attrs, st, self.numeric_owner)
if xattrs:
attrs['xattrs'] = StableDict(xattrs)
bsdflags = get_flags(path, st)
if bsdflags:
attrs['bsdflags'] = bsdflags
with backup_io():
acl_get(path, attrs, st, self.numeric_owner)
return attrs
def process_dir(self, path, st):

View File

@ -324,9 +324,13 @@ class Archiver:
return
status = None
# Ignore if nodump flag is set
try:
if get_flags(path, st) & stat.UF_NODUMP:
self.print_file_status('x', path)
return
except OSError as e:
self.print_warning('%s: %s', path, e)
return
if stat.S_ISREG(st.st_mode):
if not dry_run:
try: