1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-02-24 15:11:03 +00:00

Exception for PDFs

This commit is contained in:
M66B 2019-09-07 18:41:48 +02:00
parent a4dd59c97c
commit 74dd69b6a0

View file

@ -1148,7 +1148,9 @@ public class MessageHelper {
// For example, sometimes PDF files are sent as application/octet-stream // For example, sometimes PDF files are sent as application/octet-stream
if (!apart.pgp) { if (!apart.pgp) {
String extension = Helper.getExtension(apart.attachment.name); String extension = Helper.getExtension(apart.attachment.name);
if (extension != null) { if (extension != null &&
("pdf".equals(extension.toLowerCase()) ||
"application/octet-stream".equals(apart.attachment.type))) {
String type = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension.toLowerCase()); String type = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension.toLowerCase());
if (type != null) { if (type != null) {
if (!type.equals(apart.attachment.type)) if (!type.equals(apart.attachment.type))