Don't rename the file while it's still open

issue #111
This commit is contained in:
Ivan Habunek 2022-09-09 08:05:03 +02:00
parent 662ce72195
commit c9ab6237e8
No known key found for this signature in database
GPG Key ID: CDBD63C43A30BB95

View File

@ -83,7 +83,7 @@ async def download(
token_bucket.advance(size)
progress.advance(task_id, size)
progress.end(task_id)
os.rename(tmp_target, target)
os.rename(tmp_target, target)
async def download_with_retries(