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 (
|
import (
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"path"
|
||||||
|
|
||||||
"github.com/ProtonMail/gopenpgp/v2/crypto"
|
"github.com/ProtonMail/gopenpgp/v2/crypto"
|
||||||
"github.com/ProtonMail/proton-bridge/v2/internal/certs"
|
"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 {
|
if key, err := getVaultKey(vaultDir); err != nil {
|
||||||
insecure = true
|
insecure = true
|
||||||
|
|
||||||
|
// We store the insecure vault in a separate directory
|
||||||
|
vaultDir = path.Join(vaultDir, "insecure")
|
||||||
} else {
|
} else {
|
||||||
vaultKey = key
|
vaultKey = key
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user