Fixed the code replacing the attachment (when editing the note) to find the attachment

by its content-type.

svn path=/branches/proko2/kdepim/; revision=326026
wilder-work
David Faure 22 years ago
parent 1e3b9f5a95
commit cf8e067c11
  1. 7
      kmailicalifaceimpl.cpp

@ -212,7 +212,12 @@ bool KMailICalIfaceImpl::updateAttachment( KMMessage& msg,
// top-level parts we do *not* have to travel into embedded multiparts
DwBodyPart* part = msg.getFirstDwBodyPart();
while( part ){
if( fileName == part->partId() ){
// kdDebug() << part->Headers().ContentType().TypeStr().c_str() << " "
// << part->Headers().ContentType().SubtypeStr().c_str() << endl;
if ( part->hasHeaders()
&& part->Headers().HasContentType()
&& part->Headers().ContentType().TypeStr() == sType
&& part->Headers().ContentType().SubtypeStr() == sSubtype) {
DwBodyPart* newPart = msg.createDWBodyPart( &msgPart );
// Make sure the replacing body part is pointing
// to the same next part as the original body part.

Loading…
Cancel
Save