diff options
author | Kevin McCarthy <kevin@8t8.us> | 2021-06-28 15:07:15 -0700 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2021-06-28 15:19:31 -0700 |
commit | e985ad2a10a915019747ea2a51bddec9e4be4f5a (patch) | |
tree | dcc0db87743571a837e0fe418a02c03ae9215088 /pgp.c | |
parent | 5cc548e17af90ce57568aea1de92b6efafca19e6 (diff) |
Fix classic pgp decrypt_part() hard redraw on error.
Ensure the hard redraw is set even if the decryption fails. The agent
prompt still may have appeared.
Since we don't need to set environment variables afterwards, directly
check the OPTUSEGPGAGENT option for the post-check.
Diffstat (limited to 'pgp.c')
-rw-r--r-- | pgp.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -998,7 +998,11 @@ BODY *pgp_decrypt_part (BODY *a, STATE *s, FILE *fpout, BODY *p) } safe_fclose (&pgpout); + rv = mutt_wait_filter (thepid); + if (option (OPTUSEGPGAGENT)) + mutt_need_hard_redraw (); + mutt_unlink (mutt_b2s (pgptmpfile)); fflush (pgperr); @@ -1023,9 +1027,6 @@ BODY *pgp_decrypt_part (BODY *a, STATE *s, FILE *fpout, BODY *p) fflush (fpout); rewind (fpout); - if (pgp_use_gpg_agent()) - mutt_need_hard_redraw (); - if (fgetc (fpout) == EOF) { mutt_error _("Decryption failed"); |