Do not store modified drafts if decrypt failed
authorAndre Heinecke <aheinecke@gnupg.org>
Thu, 11 Apr 2019 12:36:12 +0000 (14:36 +0200)
committerAndre Heinecke <aheinecke@gnupg.org>
Thu, 11 Apr 2019 12:38:28 +0000 (14:38 +0200)
commit63dc1d8b5c62f73ce4a1f5ac3d967fcaf0a3fbe1
tree4f70f129b8e1cf65fca812f43dfaa2c26d95ea6e
parentb0fb9bfeb01af6c942e8736141239413b782541c
Do not store modified drafts if decrypt failed

* src/mailitem-events.cpp (BeforeAutoSave, Write): Do
not allow writes if decryption failed.
* src/mail.cpp (decryptedSuccessfully): New helper.

--
Otherwise we would re-encrypt our error message ;-)
src/mail.cpp
src/mail.h
src/mailitem-events.cpp