mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-11 13:16:53 +00:00
GODT-2081: if keychain cannot be loaded do not wipe Vault and use a temp one.
This commit is contained in:
@ -20,6 +20,7 @@ package app
|
||||
import (
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"path"
|
||||
|
||||
"github.com/ProtonMail/gopenpgp/v2/crypto"
|
||||
"github.com/ProtonMail/proton-bridge/v2/internal/certs"
|
||||
@ -80,6 +81,9 @@ func newVault(locations *locations.Locations) (*vault.Vault, bool, bool, error)
|
||||
|
||||
if key, err := getVaultKey(vaultDir); err != nil {
|
||||
insecure = true
|
||||
|
||||
// We store the insecure vault in a separate directory
|
||||
vaultDir = path.Join(vaultDir, "insecure")
|
||||
} else {
|
||||
vaultKey = key
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user