mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 19:52:17 -05:00
Fixed NullPointerException
This commit is contained in:
parent
996646e33a
commit
2cd178e684
@ -2375,11 +2375,13 @@ public class LocalStore extends Store implements Serializable {
|
|||||||
String contentDisposition = MimeUtility.unfoldAndDecode(attachment.getDisposition());
|
String contentDisposition = MimeUtility.unfoldAndDecode(attachment.getDisposition());
|
||||||
String dispositionType = contentDisposition;
|
String dispositionType = contentDisposition;
|
||||||
|
|
||||||
|
if (dispositionType != null) {
|
||||||
int pos = dispositionType.indexOf(';');
|
int pos = dispositionType.indexOf(';');
|
||||||
if (pos != -1) {
|
if (pos != -1) {
|
||||||
// extract the disposition-type, "attachment", "inline" or extension-token (see the RFC 2183)
|
// extract the disposition-type, "attachment", "inline" or extension-token (see the RFC 2183)
|
||||||
dispositionType = dispositionType.substring(0, pos);
|
dispositionType = dispositionType.substring(0, pos);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (name == null && contentDisposition != null) {
|
if (name == null && contentDisposition != null) {
|
||||||
name = MimeUtility.unfoldAndDecode(MimeUtility.getHeaderParameter(contentDisposition, "filename"));
|
name = MimeUtility.unfoldAndDecode(MimeUtility.getHeaderParameter(contentDisposition, "filename"));
|
||||||
|
Loading…
Reference in New Issue
Block a user