Handle cancellation in delete command

Otherwise a canceled delete will lead to a hidden key
and users might think that the canceled delete actually
happened.

GnuPG-Bug-Id: T3846
parent b172d6c0
......@@ -404,7 +404,7 @@ void DeleteCertificatesCommand::Private::showErrorsAndFinish()
"<p><b>%1</b></p></qt>",
pgpError ? cmsError ? pgpErrorString + QLatin1String("</br>") + cmsErrorString : pgpErrorString : cmsErrorString);
error(msg, i18n("Certificate Deletion Failed"));
} else {
} else if (!pgpError.isCanceled() && !cmsError.isCanceled()) {
std::vector<Key> keys = pgpKeys;
keys.insert(keys.end(), cmsKeys.begin(), cmsKeys.end());
KeyCache::mutableInstance()->remove(keys);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment