Merge pull request #872 from deltachat/issue-854

Attachments with spaces in file name are not handled correctly #854
This commit is contained in:
björn petersen
2019-04-26 16:01:27 +02:00
committed by GitHub
@@ -179,6 +179,7 @@ public class ApplicationDcContext extends DcContext {
private String checkMime(String path, String mimeType) {
if(mimeType == null || mimeType.equals("application/octet-stream")) {
path = path.replaceAll(" ", "");
String extension = MimeTypeMap.getFileExtensionFromUrl(path);
String newType = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);
if(newType != null) return newType;