From 2822f7cffa16ec1fad0e3edbf5c53b3d3f37e5dd Mon Sep 17 00:00:00 2001 From: Stable Diffusion Daemon Date: Sun, 6 Aug 2023 09:27:50 +0900 Subject: [PATCH] remove tmp if size overflow --- scripts/ch_lib/downloader.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/ch_lib/downloader.py b/scripts/ch_lib/downloader.py index 7786929..8bee070 100644 --- a/scripts/ch_lib/downloader.py +++ b/scripts/ch_lib/downloader.py @@ -113,5 +113,8 @@ def dl(url, folder, filename, filepath): os.rename(dl_file_path, file_path) util.printD(f"File Downloaded to: {file_path}") return file_path + elif downloaded_size > total_size: + # remove temporary-file + os.remove(dl_file_path) return