From c9ab6237e8269a9ffa8ecc0bf350b18a5b82a11d Mon Sep 17 00:00:00 2001 From: Ivan Habunek Date: Fri, 9 Sep 2022 08:05:03 +0200 Subject: [PATCH] Don't rename the file while it's still open issue #111 --- twitchdl/http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twitchdl/http.py b/twitchdl/http.py index dedf8fc..e20bbc0 100644 --- a/twitchdl/http.py +++ b/twitchdl/http.py @@ -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(