diff options
author | 2019-10-18 10:58:07 +0200 | |
---|---|---|
committer | 2019-10-18 10:58:07 +0200 | |
commit | 0faea6ebfe7d7b69436f073e31c45114dc3f3cbd (patch) | |
tree | 3744511115542d08d16e425657555e2dbe74db85 /src/index.js | |
parent | Implement #129 (diff) | |
parent | Merge pull request #130 from getferdi/l10n_develop (diff) | |
download | ferdium-app-0faea6ebfe7d7b69436f073e31c45114dc3f3cbd.tar.gz ferdium-app-0faea6ebfe7d7b69436f073e31c45114dc3f3cbd.tar.zst ferdium-app-0faea6ebfe7d7b69436f073e31c45114dc3f3cbd.zip |
Merge branch 'develop' of https://github.com/getferdi/ferdi into develop
Diffstat (limited to 'src/index.js')
-rw-r--r-- | src/index.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/index.js b/src/index.js index 4dcabb599..799e762f5 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); | 16 | app.setPath('userData', path.join(app.getPath('appData'), app.getName())); |
17 | } | 17 | } |
18 | if (isDevMode) { | 18 | if (isDevMode) { |
19 | app.setPath('userData', path.join(app.getPath('appData'), `${app.getName()}Dev`)); | 19 | app.setPath('userData', path.join(app.getPath('appData'), `${app.getName()}Dev`)); |