From f462ff87bedc61ce688d4f8c522f33a92c022077 Mon Sep 17 00:00:00 2001 From: Andrew Simachev Date: Wed, 13 Mar 2024 16:24:14 +0100 Subject: [PATCH] fix server path --- electron.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/electron.js b/electron.js index ffec0911c4..dc61bab2bd 100644 --- a/electron.js +++ b/electron.js @@ -71,10 +71,11 @@ remote.initialize(); Util.setAppPath(path.join(__dirname)); function waitForLibraryAndCreateWindows () { - const currentPath = app.getPath('userData'); const { userDataPath } = ConfigManager.config; + let currentPath = app.getPath('userData'); if (userDataPath && (userDataPath != currentPath)) { + currentPath = userDataPath; app.setPath('userData', userDataPath); }; @@ -83,7 +84,7 @@ function waitForLibraryAndCreateWindows () { Server.setAddress(process.env.ANYTYPE_USE_SIDE_SERVER); waitLibraryPromise = Promise.resolve(); } else { - waitLibraryPromise = Server.start(binPath, userDataPath); + waitLibraryPromise = Server.start(binPath, currentPath); }; Util.mkDir(Util.logPath());