Commit a0003270 authored by Damien Caliste's avatar Damien Caliste

[qmf] Don't abord part loading when encountering an empty file.

parent 8bb3bb88
......@@ -456,7 +456,7 @@ struct PartLoader
// server-side data, the parameter seems reversed...
QMailMessageBody::EncodingStatus dataState(part.contentAvailable() ? QMailMessageBody::AlreadyEncoded : QMailMessageBody::RequiresEncoding);
part.setBody(QMailMessageBody::fromFile(partFilePath, part.contentType(), part.transferEncoding(), dataState));
if (!part.hasBody())
if (!part.hasBody() && QFile(partFilePath).size())
return false;
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