diff options
author | Amine Mouafik <amine@mouafik.fr> | 2019-10-08 12:57:19 +0700 |
---|---|---|
committer | Amine Mouafik <amine@mouafik.fr> | 2019-10-08 12:57:19 +0700 |
commit | 31f864082e8dd640a3081e305ca759b4b863c6ae (patch) | |
tree | 5471c33faebc474fca038a8c5c82a6cfd127cf4d /src | |
parent | Replace electron-process-manager to report memory usage (diff) | |
download | ferdium-app-31f864082e8dd640a3081e305ca759b4b863c6ae.tar.gz ferdium-app-31f864082e8dd640a3081e305ca759b4b863c6ae.tar.zst ferdium-app-31f864082e8dd640a3081e305ca759b4b863c6ae.zip |
#87 Use FERDI_APPDATA_DIR instead of FERDI_USERDATA_DIR
Diffstat (limited to 'src')
-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 */ |