1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-30 13:12:25 -05:00

Turns out to be some code which tries to be clever about removing the

multipart envelope in LocalStore.java. It is thrown away if there is
just one item in the multipart. This breaks the display of attachment
only message, since the attachment is no longer detected by the code
which creates the view. I made a fix (see patch below) which checks if
the single item in the multipart is not a attachment.

        -- patch from wernermann29 at googlemail.com
This commit is contained in:
Jesse Vincent 2011-01-31 01:54:27 +00:00
parent fe8ba6078e
commit 4d5381f33d

View File

@ -1981,7 +1981,8 @@ public class LocalStore extends Store implements Serializable
localMessage.setHeader(MimeHeader.HEADER_CONTENT_TYPE, "text/plain");
localMessage.setBody(new TextBody(""));
}
else if (mp.getCount() == 1)
else if (mp.getCount() == 1 && (mp.getBodyPart(0) instanceof LocalAttachmentBodyPart) == false )
{
// If we have only one part, drop the MimeMultipart container.
BodyPart part = mp.getBodyPart(0);