Recursively create directories when downloading
This commit is contained in:
parent
eaf8912ffc
commit
979fba00f3
2 changed files with 2 additions and 1 deletions
|
|
@ -1 +1 @@
|
||||||
0.2.1
|
0.2.2
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,7 @@ def download_voice(
|
||||||
for voice_file in voice_files:
|
for voice_file in voice_files:
|
||||||
file_url = f"{url_base}/{voice_file.relative_path}"
|
file_url = f"{url_base}/{voice_file.relative_path}"
|
||||||
file_path = voice_dir / 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():
|
if (not redownload) and voice_file.sha256_sum and file_path.is_file():
|
||||||
# Check if file exists and has correct sha256
|
# Check if file exists and has correct sha256
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue