Merge pull request #5503 from aws-lumberyard-dev/Prism/CLIDelFileFolderFix

Fix trying to remove a cache file
This commit is contained in:
AMZN-Phil
2021-11-10 12:21:31 -08:00
committed by GitHub
+1 -1
View File
@@ -128,7 +128,7 @@ def download_file(parsed_uri, download_path: pathlib.Path, force_overwrite, down
logger.warn(f'File already downloaded to {download_path}.')
else:
try:
shutil.rmtree(download_path)
os.unlink(download_path)
except OSError:
logger.error(f'Could not remove existing download path {download_path}.')
return 1