1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 19:52:17 -05:00

Fixed NullPointerException

This commit is contained in:
Koji Arai 2011-04-10 01:10:25 +09:00
parent 996646e33a
commit 2cd178e684

View File

@ -2375,11 +2375,13 @@ public class LocalStore extends Store implements Serializable {
String contentDisposition = MimeUtility.unfoldAndDecode(attachment.getDisposition());
String dispositionType = contentDisposition;
if (dispositionType != null) {
int pos = dispositionType.indexOf(';');
if (pos != -1) {
// extract the disposition-type, "attachment", "inline" or extension-token (see the RFC 2183)
dispositionType = dispositionType.substring(0, pos);
}
}
if (name == null && contentDisposition != null) {
name = MimeUtility.unfoldAndDecode(MimeUtility.getHeaderParameter(contentDisposition, "filename"));