Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
be true if the files have been successfully updated (this is
always false for un-changed files).
"""
if not changed or success:
if source_rorp: self.statfileobj.add_source_file(source_rorp)
if dest_rorp: self.statfileobj.add_dest_file(dest_rorp)
if success == 0: metadata_rorp = dest_rorp
elif success == 1 or success == 2:
self.statfileobj.add_changed(source_rorp, dest_rorp)
metadata_rorp = source_rorp
else: metadata_rorp = None
if metadata_rorp and metadata_rorp.lstat():
metadata.WriteMetadata(metadata_rorp)
if Globals.file_statistics:
statistics.FileStats.update(source_rorp, dest_rorp, changed, inc)
if success == 0: metadata_rorp = dest_rorp
elif success == 1: metadata_rorp = source_rorp
else: metadata_rorp = None # in case deleted because of ListError
if success == 1 or success == 2:
self.statfileobj.add_changed(source_rorp, dest_rorp)
if metadata_rorp and metadata_rorp.lstat():
metadata.MetadataFile.write_object(metadata_rorp)
if Globals.eas_active and not metadata_rorp.get_ea().empty():
eas_acls.ExtendedAttributesFile.write_object(
metadata_rorp.get_ea())
if Globals.acls_active and not metadata_rorp.get_acl().is_basic():
eas_acls.AccessControlListFile.write_object(
metadata_rorp.get_acl())
if Globals.file_statistics:
statistics.FileStats.update(source_rorp, dest_rorp, changed, inc)