1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-07 04:03:29 +00:00

Attempt to fix snap integration

This commit is contained in:
Bernd Schoolmann
2025-05-30 17:51:40 +02:00
parent 4f9e96e16b
commit 548b2a5586

View File

@@ -514,6 +514,10 @@ export class NativeMessagingMain {
private homedir() {
if (process.platform === "darwin") {
return userInfo().homedir;
} else if (process.env.SNAP) {
// Snap mounts a different user directory, making it impossible to access the unsandboxed paths of native messaging hosts under that dir.
const username = userInfo().username;
return path.join("/home", username);
} else {
return homedir();
}