mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
[feat-906] changed linux home directory to XDG_DATA_HOME (#907)
This commit is contained in:
+11
-2
@@ -100,6 +100,16 @@ const findAssociatedFileInArgs = (args: string[]): string => {
|
||||
|
||||
const gotTheLock = app.requestSingleInstanceLock();
|
||||
|
||||
const init = () => {
|
||||
initServicesMustBeInitialized();
|
||||
|
||||
if (process.platform === "linux") {
|
||||
// Properly set up the home path for linux
|
||||
const homePath = process.env.XDG_DATA_HOME || path.join(process.env.HOME, ".local", "share");
|
||||
app.setPath("home", homePath);
|
||||
}
|
||||
}
|
||||
|
||||
if (!gotTheLock) {
|
||||
app.quit();
|
||||
} else {
|
||||
@@ -123,8 +133,7 @@ if (!gotTheLock) {
|
||||
app.whenReady().then(() => {
|
||||
|
||||
app.setAppUserModelId(APP_NAME);
|
||||
|
||||
initServicesMustBeInitialized();
|
||||
init();
|
||||
|
||||
const deepLink = findDeepLinkInArgs(process.argv);
|
||||
const associatedFile = findAssociatedFileInArgs(process.argv);
|
||||
|
||||
Reference in New Issue
Block a user