about summary refs log tree commit diff stats
path: root/widgets
diff options
context:
space:
mode:
authorRay Ganardi <ray@ganardi.xyz>2020-05-19 13:06:48 +0200
committerDrew DeVault <sir@cmpwn.com>2020-05-25 09:30:20 -0400
commit94e8d8f7bf5d4efb72dffb15e46a2a7d07bf4afb (patch)
tree5ca16f2da6dcba4bfeb22ec2d8f4408cbff86059 /widgets
parentc32ab765a7cfecab7a30b2c6a50d43ba69036850 (diff)
downloadaerc-94e8d8f7bf5d4efb72dffb15e46a2a7d07bf4afb.tar.gz
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.
Diffstat (limited to 'widgets')
-rw-r--r--widgets/aerc.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/widgets/aerc.go b/widgets/aerc.go
index 273777b..eb037df 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()