[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:04:03
[Download RAW message or body]

CVS commit by kloecker: 

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


  M +7 -2      kmreaderwin.cpp   1.719


--- kdepim/kmail/kmreaderwin.cpp  #1.718:1.719
@@ -1317,6 +1317,11 @@ QString KMReaderWin::writeMessagePartToT
   fname += "/" + fileName;
 
-  if( !kByteArrayToFile( aMsgPart->bodyDecodedBinary(), fname, false, false,
-                        false ) )
+  QByteArray data = aMsgPart->bodyDecodedBinary();
+  size_t size = data.size();
+  if ( aMsgPart->type() == DwMime::kTypeText ) {
+    // convert CRLF to LF before writing text attachments to disk
+    size = KMFolder::crlf2lf( data.data(), size );
+  }
+  if( !kBytesToFile( data.data(), size, fname, false, false, false ) )
     return QString::null;
 


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

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