aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/abstract/MCAbstractPart.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/abstract/MCAbstractPart.cpp')
-rw-r--r--src/core/abstract/MCAbstractPart.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/abstract/MCAbstractPart.cpp b/src/core/abstract/MCAbstractPart.cpp
index 0956368c..93578808 100644
--- a/src/core/abstract/MCAbstractPart.cpp
+++ b/src/core/abstract/MCAbstractPart.cpp
@@ -260,7 +260,10 @@ void AbstractPart::importIMAPFields(struct mailimap_body_fields * fields,
imap_param = (struct mailimap_single_body_fld_param *) clist_content(cur);
if (strcasecmp(imap_param->pa_name, "filename") == 0) {
- setFilename(String::stringByDecodingMIMEHeaderValue(imap_param->pa_value));
+ String * filename = String::stringByDecodingMIMEHeaderValue(imap_param->pa_value);
+ if (filename != NULL && filename->length() > 0) {
+ setFilename(filename);
+ }
}
}
}