diff --git a/src/main.ts b/src/main.ts index f2ff15213bb..d2aa0148c36 100644 --- a/src/main.ts +++ b/src/main.ts @@ -30,8 +30,10 @@ export class Main { let appDataPath = null; if (process.env.BITWARDEN_APPDATA_DIR != null) { appDataPath = process.env.BITWARDEN_APPDATA_DIR; - } else if (process.env.PORTABLE_EXECUTABLE_DIR != null) { + } else if (process.platform === 'win32' && process.env.PORTABLE_EXECUTABLE_DIR != null) { appDataPath = path.join(process.env.PORTABLE_EXECUTABLE_DIR, 'bitwarden-appdata'); + } else if (process.platform === 'linux' && process.env.SNAP_USER_DATA != null) { + appDataPath = process.env.SNAP_USER_DATA; } if (appDataPath != null) {