Commit f1d0cdcb authored by Andrew Branson's avatar Andrew Branson

Merge branch 'crash' into 'master'

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

See merge request !7
parents f4454a9b a0003270
......@@ -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