diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2018-04-30 09:56:15 -0300 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2018-05-09 09:55:32 -0300 |
| commit | 7ec89cd6874695563d27cb62305e2f54b09cc100 (patch) | |
| tree | 4a401f25af6e25cbd3367bf8da01cf0bfdec95aa /app | |
| parent | ddc5f1918cfa87f6d49d7a6e5eff6bcf9f78ed5f (diff) | |
| download | mullvadvpn-7ec89cd6874695563d27cb62305e2f54b09cc100.tar.xz mullvadvpn-7ec89cd6874695563d27cb62305e2f54b09cc100.zip | |
Update Windows log paths collected for reports
Diffstat (limited to 'app')
| -rw-r--r-- | app/main.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/app/main.js b/app/main.js index bfc7bcfdf2..ffc9016799 100644 --- a/app/main.js +++ b/app/main.js @@ -81,9 +81,17 @@ const appDelegate = { case 'darwin': // macOS: ~/Library/Logs/{appname} return path.join(app.getPath('home'), 'Library/Logs', appDirectoryName); + case 'win32': { + // Windows: %ALLUSERSPROFILE%\{appname} + let appDataDir = process.env.ALLUSERSPROFILE; + if (appDataDir) { + return path.join(appDataDir, appDirectoryName); + } else { + throw new Error('Missing %ALLUSERSPROFILE% environment variable'); + } + } default: // Linux: ~/.config/{appname}/logs - // Windows: ~\AppData\Roaming\{appname}\logs return path.join(app.getPath('userData'), 'logs'); } }, |
