From 1ec240e3df3e9c8571c0df174b9f239b451dbf3a Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 23 May 2018 14:01:03 +0200 Subject: Skip revisions that we can't replay. --- examples/imapresource/imapresource.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/imapresource/imapresource.cpp b/examples/imapresource/imapresource.cpp index 1daf8ed..d342ab2 100644 --- a/examples/imapresource/imapresource.cpp +++ b/examples/imapresource/imapresource.cpp @@ -705,6 +705,8 @@ public: const auto content = ensureCRLF(mail.getMimeMessage()); if (!validateContent(content)) { SinkError() << "Validation failed during creation replay " << mail.identifier() << "\n Content:" << content; + //We can't recover from this other than deleting the mail, so we skip it. + return KAsync::null(); } const auto flags = getFlags(mail); const QDateTime internalDate = mail.getDate(); @@ -743,6 +745,8 @@ public: const auto content = ensureCRLF(mail.getMimeMessage()); if (!validateContent(content)) { SinkError() << "Validation failed during modification replay " << mail.identifier() << "\n Content:" << content; + //We can't recover from this other than deleting the mail, so we skip it. + return KAsync::null(); } const QDateTime internalDate = mail.getDate(); SinkTrace() << "Replacing message. Old mailbox: " << oldMailbox << "New mailbox: " << mailbox << "Flags: " << flags << "Content: " << content; -- cgit v1.2.3