添加清理可能存在的临时文件步骤

This commit is contained in:
DLmaster
2024-11-08 22:11:48 +08:00
parent 54f9bb7f21
commit 0141bf039a

View File

@@ -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)