Recursively create directories when downloading

This commit is contained in:
Michael Hansen 2022-06-28 21:18:43 -04:00
commit 979fba00f3
2 changed files with 2 additions and 1 deletions

View file

@ -1 +1 @@
0.2.1
0.2.2

View file

@ -102,6 +102,7 @@ def download_voice(
for voice_file in voice_files:
file_url = f"{url_base}/{voice_file.relative_path}"
file_path = voice_dir / voice_file.relative_path
file_path.parent.mkdir(parents=True, exist_ok=True)
if (not redownload) and voice_file.sha256_sum and file_path.is_file():
# Check if file exists and has correct sha256