From 94e8d8f7bf5d4efb72dffb15e46a2a7d07bf4afb Mon Sep 17 00:00:00 2001 From: Ray Ganardi Date: Tue, 19 May 2020 13:06:48 +0200 Subject: feat(pgp): Show error message from pgp The error wasn't shown, making errors like wrong password being ignored and the password is prompted again. --- widgets/aerc.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/widgets/aerc.go b/widgets/aerc.go index 273777bd..eb037df2 100644 --- a/widgets/aerc.go +++ b/widgets/aerc.go @@ -568,7 +568,10 @@ func (aerc *Aerc) DecryptKeys(keys []openpgp.Key, symmetric bool) (b []byte, err err = e return } - key.PrivateKey.Decrypt([]byte(pass)) + e = key.PrivateKey.Decrypt([]byte(pass)) + if e != nil { + err = e + } }) for aerc.getpasswd != nil { aerc.ui.Tick() -- cgit