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

List:       kde-commits
Subject:    KDE_3_2_BRANCH: kdepim/kmail
From:       Ingo Klöcker <kloecker () kde ! org>
Date:       2004-01-31 13:34:02
Message-ID: 20040131133402.81F599938 () office ! kde ! org
[Download RAW message or body]

CVS commit by kloecker: 

Backport of CVS commit by kloecker: 

Fix bug 73602 (Message body lines starting with "From " are incorrectly parsed as \
message seperator in mbox folders)

This is done by using a stricter message seperator regular expression.

Additionally to this bug, "From " escaping was defunct which is a pretty grave bug \
because it can easily lead to corrupt mboxes if the index of an mbox has to be \
regenerated.

Both patches by Andreas Pfaller.


  M +2 -3      kmfoldermbox.cpp   1.92.2.1


--- kdepim/kmail/kmfoldermbox.cpp  #1.92:1.92.2.1
@@ -43,5 +43,5 @@
 // folder:
 #define MSG_SEPERATOR_START "From "
-#define MSG_SEPERATOR_REGEX "^From .*..:...*$"
+#define MSG_SEPERATOR_REGEX "^From .*[0-9][0-9]:[0-9][0-9].*$"
 static short msgSepLen = strlen(MSG_SEPERATOR_START);
 
@@ -935,6 +935,5 @@ if( fileD1.open( IO_WriteOnly ) ) {
       aMsg->removeHeaderField("Content-Type");        // the line above
   }
-  msgText = aMsg->asString();
-  escapeFrom( msgText );
+  msgText = escapeFrom( aMsg->asString() );
   size_t len = msgText.length();
 


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

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