Warn if file in directory disappears during copy, but don't crash.

This commit is contained in:
voussoir 2023-12-03 21:07:12 -08:00
parent 21a9e39e52
commit 5a76734072

View file

@ -279,6 +279,10 @@ def copy_directory(
written_bytes = 0 written_bytes = 0
for (source_file, destination_file) in walker: for (source_file, destination_file) in walker:
if not source_file.is_file:
log.warning('%s disappeared during directory copy.', source_file.absolute_path)
continue
if stop_event and stop_event.is_set(): if stop_event and stop_event.is_set():
break break