From d9025884b9c9d9c604f21d486ca318e312518cf2 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 28 Jun 2018 13:59:48 +0200 Subject: Get saving attached messages to work. --- framework/src/domain/mime/attachmentmodel.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/framework/src/domain/mime/attachmentmodel.cpp b/framework/src/domain/mime/attachmentmodel.cpp index 95a65d81..12f7ca74 100644 --- a/framework/src/domain/mime/attachmentmodel.cpp +++ b/framework/src/domain/mime/attachmentmodel.cpp @@ -152,6 +152,10 @@ static QString saveAttachmentToDisk(const QModelIndex &index, const QString &pat Q_ASSERT(part); auto node = part->node(); auto data = node->decodedContent(); + //This is necessary to store messages embedded messages (EncapsulatedRfc822MessagePart) + if (data.isEmpty()) { + data = node->encodedContent(); + } if (part->isText()) { // convert CRLF to LF before writing text attachments to disk data = KMime::CRLFtoLF(data); -- cgit v1.2.3