diff options
Diffstat (limited to 'src/helpers/portable-helpers.js')
-rw-r--r-- | src/helpers/portable-helpers.js | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/helpers/portable-helpers.js b/src/helpers/portable-helpers.js deleted file mode 100644 index 60b7b91f1..000000000 --- a/src/helpers/portable-helpers.js +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | import { app } from 'electron'; | ||
2 | import path from 'path'; | ||
3 | |||
4 | // Set app directory before loading user modules | ||
5 | export function portable() { | ||
6 | if (process.env.FERDI_APPDATA_DIR != null) { | ||
7 | app.setPath('appData', process.env.FERDI_APPDATA_DIR); | ||
8 | app.setPath('userData', path.join(app.getPath('appData'))); | ||
9 | } else if (process.env.PORTABLE_EXECUTABLE_DIR != null) { | ||
10 | app.setPath('appData', process.env.PORTABLE_EXECUTABLE_DIR, `${app.getName()}AppData`); | ||
11 | app.setPath('userData', path.join(app.getPath('appData'), `${app.getName()}AppData`)); | ||
12 | } else if (process.platform === 'win32') { | ||
13 | app.setPath('appData', process.env.APPDATA); | ||
14 | app.setPath('userData', path.join(app.getPath('appData'), app.getName())); | ||
15 | } | ||
16 | } | ||