mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-25 17:27:00 +00:00
Check for attachment name missing
This commit is contained in:
parent
2159cc7276
commit
e9fa880c72
1 changed files with 3 additions and 1 deletions
|
@ -650,7 +650,9 @@ public class FragmentCompose extends FragmentEx {
|
||||||
attachment.sequence = db.attachment().getAttachmentCount(draft.id) + 1;
|
attachment.sequence = db.attachment().getAttachmentCount(draft.id) + 1;
|
||||||
attachment.name = name;
|
attachment.name = name;
|
||||||
|
|
||||||
String extension = MimeTypeMap.getFileExtensionFromUrl(attachment.name.toLowerCase());
|
String extension = null;
|
||||||
|
if (attachment.name != null) // External attach
|
||||||
|
extension = MimeTypeMap.getFileExtensionFromUrl(attachment.name.toLowerCase());
|
||||||
if (extension != null)
|
if (extension != null)
|
||||||
attachment.type = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);
|
attachment.type = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);
|
||||||
if (attachment.type == null)
|
if (attachment.type == null)
|
||||||
|
|
Loading…
Reference in a new issue