diff options
author | Hoa V. DINH <dinh.viet.hoa@gmail.com> | 2013-07-22 07:58:00 -0700 |
---|---|---|
committer | Hoa V. DINH <dinh.viet.hoa@gmail.com> | 2013-07-22 07:58:00 -0700 |
commit | 7ee3d2a3e654a59647fde39db5950a12cd0727c1 (patch) | |
tree | fbb70abebd9266cfb10715bd3a153190db0d3a5b /src/core/rfc822 | |
parent | 08bad9b7362520548b5c81e309fccc5b8ee930a9 (diff) |
Added an Obj-C method to create a file attachment with in-memory data.
Diffstat (limited to 'src/core/rfc822')
-rw-r--r-- | src/core/rfc822/MCAttachment.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/rfc822/MCAttachment.cc b/src/core/rfc822/MCAttachment.cc index 6df46937..4d92acba 100644 --- a/src/core/rfc822/MCAttachment.cc +++ b/src/core/rfc822/MCAttachment.cc @@ -161,7 +161,9 @@ Attachment * Attachment::attachmentWithData(String * filename, Data * data) if (mimeType != NULL) { attachment->setMimeType(mimeType); } - attachment->setFilename(filename->lastPathComponent()); + if (filename != NULL) { + attachment->setFilename(filename->lastPathComponent()); + } attachment->setData(data); return (Attachment *) attachment->autorelease(); |