Fix snap protocol handler (#11932)

Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
This commit is contained in:
Bernd Schoolmann 2024-11-13 14:06:57 +01:00 committed by GitHub
parent 24ca942cd6
commit 3508b4631d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 10 deletions

View File

@ -7,6 +7,12 @@ ulimit -c 0
RAW_PATH=$(readlink -f "$0") RAW_PATH=$(readlink -f "$0")
APP_PATH=$(dirname $RAW_PATH) APP_PATH=$(dirname $RAW_PATH)
# force use of base image libdus in snap
if [ -e "/usr/lib/x86_64-linux-gnu/libdbus-1.so.3" ]
then
export LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libdbus-1.so.3"
fi
# pass through all args # pass through all args
$APP_PATH/bitwarden-app "$@" $APP_PATH/bitwarden-app "$@"

View File

@ -12,15 +12,7 @@ import { BiometricStateService } from "@bitwarden/key-management";
import { WindowState } from "../platform/models/domain/window-state"; import { WindowState } from "../platform/models/domain/window-state";
import { DesktopSettingsService } from "../platform/services/desktop-settings.service"; import { DesktopSettingsService } from "../platform/services/desktop-settings.service";
import { import { cleanUserAgent, isDev, isLinux, isMac, isMacAppStore, isWindows } from "../utils";
cleanUserAgent,
isDev,
isLinux,
isMac,
isMacAppStore,
isSnapStore,
isWindows,
} from "../utils";
const mainWindowSizeKey = "mainWindowSize"; const mainWindowSizeKey = "mainWindowSize";
const WindowEventHandlingDelay = 100; const WindowEventHandlingDelay = 100;
@ -84,7 +76,7 @@ export class WindowMain {
return new Promise<void>((resolve, reject) => { return new Promise<void>((resolve, reject) => {
try { try {
if (!isMacAppStore() && !isSnapStore()) { if (!isMacAppStore()) {
const gotTheLock = app.requestSingleInstanceLock(); const gotTheLock = app.requestSingleInstanceLock();
if (!gotTheLock) { if (!gotTheLock) {
app.quit(); app.quit();