From 0141bf039a69226452425025919848616fb369a0 Mon Sep 17 00:00:00 2001 From: DLmaster Date: Fri, 8 Nov 2024 22:11:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B8=85=E7=90=86=E5=8F=AF?= =?UTF-8?q?=E8=83=BD=E5=AD=98=E5=9C=A8=E7=9A=84=E4=B8=B4=E6=97=B6=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E6=AD=A5=E9=AA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Updater.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Updater.py b/Updater.py index e4f24f3..457a86e 100644 --- a/Updater.py +++ b/Updater.py @@ -61,6 +61,11 @@ class UpdateProcess(QThread): def run(self): + # 清理可能存在的临时文件 + try: + os.remove(self.download_path) + except FileNotFoundError: + pass # 下载 try: response = requests.get(self.download_url, stream=True)