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:
parent
a4dd59c97c
commit
74dd69b6a0
1 changed files with 3 additions and 1 deletions
|
@ -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))
|
||||||
|
|
Loading…
Reference in a new issue