mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-29 11:15:51 +00:00
Catch attachments parse exceptions
This commit is contained in:
parent
a20247a9cd
commit
8c55c6dc8d
1 changed files with 7 additions and 1 deletions
|
@ -644,7 +644,13 @@ public class MessageHelper {
|
|||
List<EntityAttachment> result = new ArrayList<>();
|
||||
|
||||
for (AttachmentPart apart : attachments) {
|
||||
ContentType ct = new ContentType(apart.part.getContentType());
|
||||
ContentType ct;
|
||||
try {
|
||||
ct = new ContentType(apart.part.getContentType());
|
||||
} catch (ParseException ex) {
|
||||
Log.w(ex);
|
||||
ct = new ContentType("application/octet-stream");
|
||||
}
|
||||
String[] cid = apart.part.getHeader("Content-ID");
|
||||
|
||||
EntityAttachment attachment = new EntityAttachment();
|
||||
|
|
Loading…
Reference in a new issue