From 454af523ecb4ed54088c214ebf2d9b912414474a Mon Sep 17 00:00:00 2001 From: wailovet Date: Sun, 28 Apr 2024 17:02:01 +0800 Subject: [PATCH] 'update' --- mz_prompt_utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mz_prompt_utils.py b/mz_prompt_utils.py index 6f837db..5e5579f 100644 --- a/mz_prompt_utils.py +++ b/mz_prompt_utils.py @@ -425,6 +425,8 @@ class Utils: def download_file_thread(response, cache_filepath): block_size = 1024 + if end - (start + existing_size) < block_size: + block_size = end - (start + existing_size) with open(cache_filepath, "ab") as file: for data in response.iter_content(block_size): file.write(data)