mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-10 04:36:43 +00:00
fix(GODT-3102): Distinguish Vault Decryption from Serialization Errors
Rather than returning whether the vault was corrupt or not return the error which caused the vault to be considered as corrupt.
This commit is contained in:
@ -112,8 +112,8 @@ func (t *testCtx) initBridge() (<-chan events.Event, error) {
|
||||
vault, corrupt, err := vault.New(vaultDir, gluonCacheDir, t.storeKey, async.NoopPanicHandler{})
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not create vault: %w", err)
|
||||
} else if corrupt {
|
||||
return nil, fmt.Errorf("vault is corrupt")
|
||||
} else if corrupt != nil {
|
||||
return nil, fmt.Errorf("vault is corrupt: %w", corrupt)
|
||||
}
|
||||
t.vault = vault
|
||||
|
||||
|
||||
Reference in New Issue
Block a user