fix(BRIDGE-395): skip saving the last used keychain helper as user preference on Windows & macOS

This commit is contained in:
Atanas Janeshliev
2025-06-27 13:23:06 +02:00
parent bffad05933
commit 2669bb4df9

View File

@ -22,6 +22,7 @@ import (
"encoding/hex"
"fmt"
"path"
"runtime"
"github.com/ProtonMail/gluon/async"
"github.com/ProtonMail/proton-bridge/v3/internal/certs"
@ -106,10 +107,12 @@ func newVault(reporter *sentry.Reporter, locations *locations.Locations, keychai
return nil, false, corrupt, fmt.Errorf("could not create vault: %w", err)
}
// Remember the last successfully used keychain and store that as the user preference.
// Remember the last successfully used keychain on Linux and store that as the user preference.
if runtime.GOOS == "linux" {
if err := vault.SetHelper(vaultDir, lastUsedHelper); err != nil {
logrus.WithError(err).Error("Could not store last used keychain helper")
}
}
return userVault, insecure, corrupt, nil
}