Data download script fix (#646)

* Fixed case where no data has been downloaded

* Directory deletion
This commit is contained in:
David McAllister authored and GitHub committed 2022-10-04 12:59:06 -07:00
1 parent 13e47b505e
commit 4f5cc28b8d
1 file changed
+2 -1
+2 -1
View File
@@ -21,7 +21,8 @@ def download_blender(save_dir: Path):
blender_file_id = "18JxhpWD-4ZmuFKLzKlAw-w5PpzZxXOcG"
final_path = save_dir / Path("blender")
os.remove(str(final_path))
if os.path.exists(final_path):
shutil.rmtree(str(final_path))
url = f"https://drive.google.com/uc?id={blender_file_id}"
download_path = save_dir / "blender_data.zip"
gdown.download(url, output=str(download_path))