aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar Amine Mouafik <amine@mouafik.fr>2019-10-18 08:31:51 +0700
committerLibravatar Amine Mouafik <amine@mouafik.fr>2019-10-18 08:31:51 +0700
commitd135ab36e8bb7849888bd891ecc4b3b20115f8a7 (patch)
tree78ce56e02906e6f9178baac930b492c5de296415 /src
parentNew Crowdin translations (#125) (diff)
downloadferdium-app-d135ab36e8bb7849888bd891ecc4b3b20115f8a7.tar.gz
ferdium-app-d135ab36e8bb7849888bd891ecc4b3b20115f8a7.tar.zst
ferdium-app-d135ab36e8bb7849888bd891ecc4b3b20115f8a7.zip
#87 Explicitly set both appData and userData
Diffstat (limited to 'src')
-rw-r--r--src/index.js8
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';
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); 16 app.setPath('userData', path.join(app.getPath('appData'), app.getName()));
17} 17}
18if (isDevMode) { 18if (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`));