--- a/ipsservices/ipssosplugin/src/ipsplgmessagepartstoreroperation.cpp Fri May 14 15:41:10 2010 +0300
+++ b/ipsservices/ipssosplugin/src/ipsplgmessagepartstoreroperation.cpp Thu May 27 12:43:55 2010 +0300
@@ -287,9 +287,13 @@
RFile file = aPart->GetContentFileL();
CleanupClosePushL(file);
+ // if we don't do SetSize(0) characters from the original mail are left in the end of the mail
+ // if the modified mail contains less characters.
+ User::LeaveIfError( file.SetSize( 0 ) );
+
// Write new content to text/html part file - async function
- file.Write(0, *iDataBuffer, iDataBuffer->Length(), iStatus);
-
+ file.Write( 0, *iDataBuffer, iDataBuffer->Length(), iStatus );
+
CleanupStack::PopAndDestroy(2, data16);
SetActive();
}