This commit is contained in:
Kovid Goyal 2023-06-06 15:08:26 +05:30
parent c3da25d112
commit e20e7f1d51
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -225,11 +225,9 @@ def copy_tree(
with copier:
copier.copy_all()
if delete_source:
if delete_source and os.path.exists(make_long_path_useable(src)):
try:
shutil.rmtree(make_long_path_useable(src))
except FileNotFoundError:
pass
except OSError:
if iswindows:
time.sleep(WINDOWS_SLEEP_FOR_RETRY_TIME)