Overwrite .new files if needed

Addresses issue #213
This commit is contained in:
2Shirt 2023-04-01 22:25:11 -07:00
parent ddb9c4041b
commit 96136e8e46
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -38,6 +38,7 @@ def download_file(out_path, source_url, as_new=False, overwrite=False, referer=N
download_msg = f'Downloading {name}...'
if as_new:
out_path = out_path.with_suffix(f'{out_path.suffix}.new')
overwrite = True
print(download_msg, end='', flush=True)
# Avoid clobbering