From ff923b3783aefef855ffa2616d170a3c44c4a42b Mon Sep 17 00:00:00 2001 From: Andreas Gungl Date: Wed, 21 Jan 2004 22:52:54 +0000 Subject: [PATCH] Line ending for messages retrieved from a POP account will be changed from CR/LF to LF. This simplifies further processing e.g. when applying a pipe through filter action so that an external program doesn't have to care for the line ending itself. This fixes bug #69418 - filters don't work anymore as in 3.1.4 candidate for backport to 3.2.1 svn path=/trunk/kdepim/; revision=281690 --- kmacctexppop.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kmacctexppop.cpp b/kmacctexppop.cpp index 9583b4173..d0d36111a 100644 --- a/kmacctexppop.cpp +++ b/kmacctexppop.cpp @@ -353,6 +353,10 @@ void KMAcctExpPop::slotMsgRetrieved(KIO::Job*, const QString & infoMsg) { if (infoMsg != "message complete") return; KMMessage *msg = new KMMessage; + // Make sure to use LF as line ending to make the processing easier + // when piping through external programs + uint newSize = KMFolder::crlf2lf( curMsgData.data(), curMsgData.size() ); + curMsgData.resize( newSize ); msg->fromByteArray( curMsgData , true ); if (stage == Head) {