aboutsummaryrefslogtreecommitdiffstats
path: root/src/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js9
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';
10import windowStateKeeper from 'electron-window-state'; 10import windowStateKeeper from 'electron-window-state';
11 11
12// Set app directory before loading user modules 12// Set app directory before loading user modules
13if (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}
13if (isDevMode) { 18if (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 */