aboutsummaryrefslogtreecommitdiffstats
path: root/src/encrypt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/encrypt.c')
-rw-r--r--src/encrypt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/encrypt.c b/src/encrypt.c
index c5f668ea..241748cd 100644
--- a/src/encrypt.c
+++ b/src/encrypt.c
@@ -126,7 +126,9 @@ _gpgme_encrypt_status_handler (void *priv, gpgme_status_code_t code,
switch (code)
{
case GPGME_STATUS_FAILURE:
- opd->failure_code = _gpgme_parse_failure (args);
+ if (!opd->failure_code
+ || gpg_err_code (opd->failure_code) == GPG_ERR_GENERAL)
+ opd->failure_code = _gpgme_parse_failure (args);
break;
case GPGME_STATUS_EOF: