fix: fix portable dir setup time (#6022)

This commit is contained in:
Song 2025-05-15 22:07:10 +08:00 committed by GitHub
parent 385a6793f5
commit b48c6525ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -26,6 +26,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.
@ -58,8 +61,6 @@ if (!app.requestSingleInstanceLock()) {
replaceDevtoolsFont(mainWindow)
setUserDataDir()
// Setup deep link for AppImage on Linux
await setupAppImageDeepLink()