aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2005-10-14 18:21:43 +0000
committerVincent Richard <[email protected]>2005-10-14 18:21:43 +0000
commit623857cb80528cbfa8695d597ba3550a67c07006 (patch)
treecbeb76557464361c84f6406a337dcef902935214
parentFixed a mistake in the getBodyPartAttachment() function comment. (diff)
downloadvmime-623857cb80528cbfa8695d597ba3550a67c07006.tar.gz
vmime-623857cb80528cbfa8695d597ba3550a67c07006.zip
Not an attachment if a 'Content-Id' field is present.
-rw-r--r--src/attachmentHelper.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/attachmentHelper.cpp b/src/attachmentHelper.cpp
index 0388ae7c..82e19f3f 100644
--- a/src/attachmentHelper.cpp
+++ b/src/attachmentHelper.cpp
@@ -64,6 +64,11 @@ const bool attachmentHelper::isBodyPartAnAttachment(ref <const bodyPart> part)
if (type.getType() != mediaTypes::TEXT &&
type.getType() != mediaTypes::MULTIPART)
{
+ // If a "Content-Id" field is present, it might be an
+ // embedded object (MHTML messages)
+ if (part->getHeader()->hasField(vmime::fields::CONTENT_ID))
+ return false;
+
return true;
}
}