[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdepim/kmail
From:       Ingo Klöcker <kloecker () kde ! org>
Date:       2003-11-09 23:49:03
[Download RAW message or body]

CVS commit by kloecker: 

Apply CRLF -> LF conversion on text attachments before we write them to disk.


  M +6 -1      kmcommands.cpp   1.85


--- kdepim/kmail/kmcommands.cpp  #1.84:1.85
@@ -1812,5 +1812,10 @@ void KMSaveAttachmentsCommand::saveItem(
         if( (bSaveEncrypted || !bEncryptedParts) && bSaveWithSig ) {
           QByteArray cstr = node->msgPart().bodyDecodedBinary();
-          ds.writeRawBytes( cstr, cstr.size() );
+          size_t size = cstr.size();
+          if ( node->msgPart().type() == DwMime::kTypeText ) {
+            // convert CRLF to LF before writing text attachments to disk
+            size = KMFolder::crlf2lf( cstr.data(), size );
+          }
+          ds.writeRawBytes( cstr.data(), size );
         }
       }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic