diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/config.js | 3 | ||||
-rw-r--r-- | src/index.js | 8 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/config.js b/src/config.js index ad4fc6165..761d26eea 100644 --- a/src/config.js +++ b/src/config.js | |||
@@ -113,8 +113,7 @@ export const FILE_SYSTEM_SETTINGS_TYPES = [ | |||
113 | 113 | ||
114 | export const LOCAL_SERVER = 'You are using Ferdi without a server'; | 114 | export const LOCAL_SERVER = 'You are using Ferdi without a server'; |
115 | 115 | ||
116 | // export const SETTINGS_PATH = path.join(app.getPath('userData'), 'config'); | 116 | export const SETTINGS_PATH = path.join(app.getPath('userData'), 'config'); |
117 | export const SETTINGS_PATH = path.join(app.getPath('appData'), 'config'); | ||
118 | 117 | ||
119 | // Replacing app.asar is not beautiful but unforunately necessary | 118 | // Replacing app.asar is not beautiful but unforunately necessary |
120 | export const RECIPES_PATH = asarPath(path.join(__dirname, 'recipes')); | 119 | export const RECIPES_PATH = asarPath(path.join(__dirname, 'recipes')); |
diff --git a/src/index.js b/src/index.js index edcea2049..fd96f8a49 100644 --- a/src/index.js +++ b/src/index.js | |||
@@ -10,10 +10,10 @@ import path from 'path'; | |||
10 | import windowStateKeeper from 'electron-window-state'; | 10 | import windowStateKeeper from 'electron-window-state'; |
11 | 11 | ||
12 | // Set app directory before loading user modules | 12 | // Set app directory before loading user modules |
13 | if (process.env.FERDI_APPDATA_DIR != null) { | 13 | if (process.env.FERDI_APPDATA_DIR || process.env.PORTABLE_EXECUTABLE_DIR) { |
14 | app.setPath('appData', process.env.FERDI_APPDATA_DIR); | 14 | const appDataPath = process.env.FERDI_APPDATA_DIR || process.env.PORTABLE_EXECUTABLE_DIR |
15 | } else if (process.env.PORTABLE_EXECUTABLE_DIR != null) { | 15 | app.setPath('appData', appDataPath); |
16 | app.setPath('appData', process.env.PORTABLE_EXECUTABLE_DIR, `${app.getName()}-appdata`); | 16 | app.setPath('userData', path.join(app.getPath('appData'), app.getName())); |
17 | } | 17 | } |
18 | 18 | ||
19 | if (isDevMode) { | 19 | if (isDevMode) { |