summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--app/main.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/main.js b/app/main.js
index c6a2de0b11..b9aae68692 100644
--- a/app/main.js
+++ b/app/main.js
@@ -2,6 +2,12 @@ import path from 'path';
import { app, crashReporter, BrowserWindow, ipcMain, Tray, Menu, nativeImage } from 'electron';
import NSEventMonitor from 'nseventmonitor';
+// Override appData path to avoid collisions with old client
+// New userData path, i.e on macOS: ~/Library/Application Support/mullvad.vpn
+const applicationSupportPath = app.getPath('appData');
+const userDataPath = path.join(applicationSupportPath, 'mullvad.vpn');
+app.setPath('userData', userDataPath);
+
const isDevelopment = (process.env.NODE_ENV === 'development');
let window = null;