diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-05-23 14:01:03 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-05-23 14:01:03 +0200 |
commit | 1ec240e3df3e9c8571c0df174b9f239b451dbf3a (patch) | |
tree | df0a680079fa01cf768d2f3515a6f4a569cb0b65 /examples | |
parent | 15a2adf1a4f5f32fe8413fa36ec0e360a4db0c3b (diff) | |
download | sink-1ec240e3df3e9c8571c0df174b9f239b451dbf3a.tar.gz sink-1ec240e3df3e9c8571c0df174b9f239b451dbf3a.zip |
Skip revisions that we can't replay.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/imapresource/imapresource.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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: | |||
705 | const auto content = ensureCRLF(mail.getMimeMessage()); | 705 | const auto content = ensureCRLF(mail.getMimeMessage()); |
706 | if (!validateContent(content)) { | 706 | if (!validateContent(content)) { |
707 | SinkError() << "Validation failed during creation replay " << mail.identifier() << "\n Content:" << content; | 707 | SinkError() << "Validation failed during creation replay " << mail.identifier() << "\n Content:" << content; |
708 | //We can't recover from this other than deleting the mail, so we skip it. | ||
709 | return KAsync::null<QByteArray>(); | ||
708 | } | 710 | } |
709 | const auto flags = getFlags(mail); | 711 | const auto flags = getFlags(mail); |
710 | const QDateTime internalDate = mail.getDate(); | 712 | const QDateTime internalDate = mail.getDate(); |
@@ -743,6 +745,8 @@ public: | |||
743 | const auto content = ensureCRLF(mail.getMimeMessage()); | 745 | const auto content = ensureCRLF(mail.getMimeMessage()); |
744 | if (!validateContent(content)) { | 746 | if (!validateContent(content)) { |
745 | SinkError() << "Validation failed during modification replay " << mail.identifier() << "\n Content:" << content; | 747 | SinkError() << "Validation failed during modification replay " << mail.identifier() << "\n Content:" << content; |
748 | //We can't recover from this other than deleting the mail, so we skip it. | ||
749 | return KAsync::null<QByteArray>(); | ||
746 | } | 750 | } |
747 | const QDateTime internalDate = mail.getDate(); | 751 | const QDateTime internalDate = mail.getDate(); |
748 | SinkTrace() << "Replacing message. Old mailbox: " << oldMailbox << "New mailbox: " << mailbox << "Flags: " << flags << "Content: " << content; | 752 | SinkTrace() << "Replacing message. Old mailbox: " << oldMailbox << "New mailbox: " << mailbox << "Flags: " << flags << "Content: " << content; |