From e9d6b9f44188171831afe1993e2e5384fcb2bc8d Mon Sep 17 00:00:00 2001 From: Song <1667077010@qq.com> Date: Thu, 15 May 2025 22:07:10 +0800 Subject: [PATCH] fix: fix portable dir setup time (#6022) --- src/main/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/index.ts b/src/main/index.ts index d4cd944d8a..fb79b1e842 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -40,6 +40,9 @@ if (!app.requestSingleInstanceLock()) { app.quit() process.exit(0) } else { + // Portable dir must be setup before app ready + setUserDataDir() + // This method will be called when Electron has finished // initialization and is ready to create browser windows. // Some APIs can only be used after this event occurs. @@ -72,8 +75,6 @@ if (!app.requestSingleInstanceLock()) { replaceDevtoolsFont(mainWindow) - setUserDataDir() - // Setup deep link for AppImage on Linux await setupAppImageDeepLink()