diff options
author | 2019-10-04 09:18:06 +0700 | |
---|---|---|
committer | 2019-10-04 09:18:06 +0700 | |
commit | 0fd11d2625d522ea8bb878d5d72e41ab1c7f9e77 (patch) | |
tree | b2926dadde8c01a3fe1a20f12ab5aec2c3df2b5d /src/index.js | |
parent | Fix syntax for multiple targets/archs defs (diff) | |
download | ferdium-app-0fd11d2625d522ea8bb878d5d72e41ab1c7f9e77.tar.gz ferdium-app-0fd11d2625d522ea8bb878d5d72e41ab1c7f9e77.tar.zst ferdium-app-0fd11d2625d522ea8bb878d5d72e41ab1c7f9e77.zip |
Better handling for user data path (user-defined or portable-friendly)
Diffstat (limited to 'src/index.js')
-rw-r--r-- | src/index.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/index.js b/src/index.js index 73fc6e299..1b982c77e 100644 --- a/src/index.js +++ b/src/index.js | |||
@@ -11,7 +11,11 @@ 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 (isDevMode) { | 13 | if (isDevMode) { |
14 | app.setPath('userData', path.join(app.getPath('appData'), 'FranzDev')); | 14 | 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())); | ||
15 | } | 19 | } |
16 | 20 | ||
17 | /* eslint-disable import/first */ | 21 | /* eslint-disable import/first */ |