From 6719d4d3f0374906161e0dc15d0e52ee8ddef9ab Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 23 Feb 2018 17:11:18 -0500 Subject: [PATCH] use SNAP_USER_DATA --- src/main.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index f2ff1521..d2aa0148 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) {