1
0
Fork 0
mirror of https://github.com/anyproto/anytype-ts.git synced 2025-06-08 05:57:02 +09:00

fix server path

This commit is contained in:
Andrew Simachev 2024-03-13 16:24:14 +01:00
parent 6ee21d2460
commit f462ff87be
No known key found for this signature in database
GPG key ID: 49A163D0D14E6FD8

View file

@ -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());