Browse Source

Check for attachment name missing

main
M66B 6 years ago
parent
commit
e9fa880c72
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      app/src/main/java/eu/faircode/email/FragmentCompose.java

+ 3
- 1
app/src/main/java/eu/faircode/email/FragmentCompose.java View File

@ -650,7 +650,9 @@ public class FragmentCompose extends FragmentEx {
attachment.sequence = db.attachment().getAttachmentCount(draft.id) + 1;
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)
attachment.type = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);
if (attachment.type == null)


Loading…
Cancel
Save