fix(ui): 修复更新器无法启动的异常

This commit is contained in:
DLmaster
2025-04-12 23:09:47 +08:00
parent a7e0e7b217
commit 7d5dccc649
3 changed files with 16 additions and 8 deletions

View File

@@ -599,7 +599,7 @@ class MaaUserConfig(QConfig):
class AppConfig(GlobalConfig):
VERSION = "4.3.1.0"
VERSION = "4.3.1.1"
gameid_refreshed = Signal()
PASSWORD_refreshed = Signal()

View File

@@ -238,6 +238,14 @@ class AUTO_MAA(MSFluentWindow):
# 清理旧日志
self.clean_old_logs()
# 清理临时更新器
if (Config.app_path / "AUTO_Updater.active.exe").exists():
try:
System.kill_process(Config.app_path / "AUTO_Updater.active.exe")
(Config.app_path / "AUTO_Updater.active.exe").unlink()
except Exception:
pass
# 检查密码
self.setting.check_PASSWORD()
@@ -399,11 +407,6 @@ class AUTO_MAA(MSFluentWindow):
self.show_ui("隐藏到托盘", if_quick=True)
# 清理临时更新器
if (Config.app_path / "AUTO_Updater.active.exe").exists():
System.kill_process(Config.app_path / "AUTO_Updater.active.exe")
(Config.app_path / "AUTO_Updater.active.exe").unlink()
# 清理各功能线程
MainTimer.Timer.stop()
MainTimer.Timer.deleteLater()