mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-24 07:01:05 +00:00
Catch TNEF attachment errors
This commit is contained in:
parent
fc80a35ef2
commit
6c9d0bb938
1 changed files with 29 additions and 25 deletions
|
@ -2165,7 +2165,8 @@ public class MessageHelper {
|
|||
db.attachment().setDownloaded(attachment.id, (long) body.length());
|
||||
}
|
||||
|
||||
for (org.apache.poi.hmef.Attachment at : msg.getAttachments()) {
|
||||
for (org.apache.poi.hmef.Attachment at : msg.getAttachments())
|
||||
try {
|
||||
String filename = at.getLongFilename();
|
||||
if (filename == null)
|
||||
filename = at.getFilename();
|
||||
|
@ -2190,6 +2191,9 @@ public class MessageHelper {
|
|||
}
|
||||
|
||||
db.attachment().setDownloaded(attachment.id, (long) data.length);
|
||||
} catch (Throwable ex) {
|
||||
// java.lang.IllegalArgumentException: Attachment corrupt - no Data section
|
||||
Log.e(ex);
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
|
Loading…
Reference in a new issue