From 3b93d920130bd4dc345d719a1f1ac1681bd0a5b1 Mon Sep 17 00:00:00 2001 From: yunyun <1159428885@qq.com> Date: Tue, 2 Jun 2026 16:44:26 +0800 Subject: [PATCH] ! --- main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 38d3133..53b52c4 100644 --- a/main.js +++ b/main.js @@ -404,9 +404,8 @@ app.whenReady().then(() => { return; } - // 提前初始化 BASE_DIR 和日志路径,确保所有 writeLog 都写入文件 + // 提前初始化 BASE_DIR 以读取配置文件 BASE_DIR = app.getPath('userData'); - initPaths(); // 检查是否启用防止多次启动 let preventMultipleLaunch = true; @@ -432,6 +431,8 @@ app.whenReady().then(() => { } } + initPaths(); + cleanupExpiredLogs(); try {