mirror of https://github.com/M66B/FairEmail.git
Fixed decryption
This commit is contained in:
parent
2a38a42f44
commit
a4dd59c97c
|
@ -1059,8 +1059,10 @@ public class MessageHelper {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ContentType ct = new ContentType(cpart.getContentType());
|
ContentType ct = new ContentType(cpart.getContentType());
|
||||||
if ("application/pgp-encrypted".equals(ct.getBaseType().toLowerCase()))
|
if ("application/pgp-encrypted".equals(ct.getBaseType().toLowerCase())) {
|
||||||
pgp = true;
|
pgp = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
} catch (ParseException ex) {
|
} catch (ParseException ex) {
|
||||||
Log.w(ex);
|
Log.w(ex);
|
||||||
}
|
}
|
||||||
|
@ -1144,6 +1146,7 @@ public class MessageHelper {
|
||||||
|
|
||||||
// Try to guess a better content type
|
// Try to guess a better content type
|
||||||
// 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) {
|
||||||
String extension = Helper.getExtension(apart.attachment.name);
|
String extension = Helper.getExtension(apart.attachment.name);
|
||||||
if (extension != null) {
|
if (extension != null) {
|
||||||
String type = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension.toLowerCase());
|
String type = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension.toLowerCase());
|
||||||
|
@ -1153,6 +1156,7 @@ public class MessageHelper {
|
||||||
apart.attachment.type = type;
|
apart.attachment.type = type;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (apart.attachment.size <= 0)
|
if (apart.attachment.size <= 0)
|
||||||
apart.attachment.size = null;
|
apart.attachment.size = null;
|
||||||
|
|
Loading…
Reference in New Issue