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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user