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: with copier:
copier.copy_all() copier.copy_all()
if delete_source: if delete_source and os.path.exists(make_long_path_useable(src)):
try: try:
shutil.rmtree(make_long_path_useable(src)) shutil.rmtree(make_long_path_useable(src))
except FileNotFoundError:
pass
except OSError: except OSError:
if iswindows: if iswindows:
time.sleep(WINDOWS_SLEEP_FOR_RETRY_TIME) time.sleep(WINDOWS_SLEEP_FOR_RETRY_TIME)