diff options
-rw-r--r-- | src/index.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/index.js b/src/index.js index 96f840533..449bbad19 100644 --- a/src/index.js +++ b/src/index.js | |||
@@ -10,12 +10,13 @@ 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) { | ||
14 | app.setPath('appData', process.env.FERDI_APPDATA_DIR); | ||
15 | } else if (process.env.PORTABLE_EXECUTABLE_DIR != null) { | ||
16 | app.setPath('appData', process.env.PORTABLE_EXECUTABLE_DIR); | ||
17 | } | ||
13 | if (isDevMode) { | 18 | if (isDevMode) { |
14 | app.setPath('userData', path.join(app.getPath('appData'), `${app.getName()}Dev`)); | 19 | app.setPath('userData', path.join(app.getPath('appData'), `${app.getName()}Dev`)); |
15 | } else if (process.env.FERDI_USERDATA_DIR != null) { | ||
16 | app.setPath('userData', process.env.FERDI_USERDATA_DIR); | ||
17 | } else if (process.env.PORTABLE_EXECUTABLE_DIR != null) { | ||
18 | app.setPath('userData', path.join(process.env.PORTABLE_EXECUTABLE_DIR, app.getName())); | ||
19 | } | 20 | } |
20 | 21 | ||
21 | /* eslint-disable import/first */ | 22 | /* eslint-disable import/first */ |