Commit d4ed3797 authored by Till Adam's avatar Till Adam
Browse files

Be robust against payload exceptions due to corrupted items.

svn path=/trunk/KDE/kdepim/runtime/; revision=1186742
parent 6ff0fa05
......@@ -106,8 +106,13 @@ void MoveItemTask::triggerCopyJob( KIMAP::Session *session )
// save message id, might be needed later to search for the
// resulting message uid.
try {
KMime::Message::Ptr msg = item().payload<KMime::Message::Ptr>();
m_messageId = msg->messageID()->asUnicodeString().toUtf8();
} catch ( Akonadi::PayloadException e ) {
cancelTask( i18n("Failed to copy item, it has no message payload. Remote id: %1").arg( uid ) );
KIMAP::CopyJob *copy = new KIMAP::CopyJob( session );
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