aboutsummaryrefslogtreecommitdiffstats
path: root/src/index.js
diff options
context:
space:
mode:
authorLibravatar Amine Mouafik <amine@mouafik.fr>2019-10-08 12:57:19 +0700
committerLibravatar Amine Mouafik <amine@mouafik.fr>2019-10-08 12:57:19 +0700
commit31f864082e8dd640a3081e305ca759b4b863c6ae (patch)
tree5471c33faebc474fca038a8c5c82a6cfd127cf4d /src/index.js
parentReplace electron-process-manager to report memory usage (diff)
downloadferdium-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/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 */