Update of /cvsroot/mahogany/M/src/classes
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv9916/src/classes

Modified Files:
        MessageView.cpp 
Log Message:
handle quoted CIDs correctly

Index: MessageView.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/classes/MessageView.cpp,v
retrieving revision 1.172
retrieving revision 1.173
diff -b -u -2 -r1.172 -r1.173
--- MessageView.cpp     26 Jun 2006 18:26:02 -0000      1.172
+++ MessageView.cpp     24 Jul 2006 14:13:41 -0000      1.173
@@ -2447,5 +2447,5 @@
 }
 
-bool MessageView::StoreMIMEPartData(const MimePart *part, const String& cid)
+bool MessageView::StoreMIMEPartData(const MimePart *part, const String& 
cidOrig)
 {
    unsigned long len;
@@ -2469,4 +2469,14 @@
    }
 
+   // cid could be quoted with <...>, unquote it then as it's referenced
+   // without the quotes in the other parts
+   CHECK( !cidOrig.empty(), false, "empty CID not allowed" );
+
+   String cid;
+   if ( *cidOrig.begin() == '<' && *cidOrig.rbegin() == '>' )
+      cid.assign(cidOrig, 1, cidOrig.length() - 2);
+   else
+      cid = cidOrig;
+
    m_cidsInMemory->Add(cid);
    MIMEFSHandler::AddFile(cid, data, len);


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to