aboutsummaryrefslogtreecommitdiffstats
path: root/src/index.js
diff options
context:
space:
mode:
authorLibravatar Makazzz <makazzzpro@live.ca>2019-10-26 15:24:16 -0400
committerLibravatar Makazzz <makazzzpro@live.ca>2019-10-26 15:24:16 -0400
commitbc21d533bd2c1b9f4bdfb8553b4a3f21d1b845e1 (patch)
tree42d07b747b87f5f3193af3021b9fa6a1b28e852b /src/index.js
parentChange appData env (diff)
downloadferdium-app-bc21d533bd2c1b9f4bdfb8553b4a3f21d1b845e1.tar.gz
ferdium-app-bc21d533bd2c1b9f4bdfb8553b4a3f21d1b845e1.tar.zst
ferdium-app-bc21d533bd2c1b9f4bdfb8553b4a3f21d1b845e1.zip
Testing
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js8
1 files changed, 4 insertions, 4 deletions
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';
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) { 13if (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
19if (isDevMode) { 19if (isDevMode) {