/offlineimap/head: changeset 444

Fixed line-ending code to deal with files with mixed \n and \r\n
codes. This is a rare case, but now is more onerous because we now
have to find headers.
This commit is contained in:
jgoerzen 2003-04-18 05:18:54 +01:00
parent b9f2eca42c
commit ced2acc6cf
2 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,12 @@
offlineimap (3.99.13) unstable; urgency=low
* Fixed password prompting for non-Curses UIs.
* Fixed line-ending code to deal with files with mixed \n and \r\n
codes. This is a rare case, but now is more onerous because we now
have to find headers.
-- John Goerzen <jgoerzen@complete.org> Thu, 17 Apr 2003 18:02:13 -0500
offlineimap (3.99.12) unstable; urgency=low
* This is a 4.0 TRACK release, and may be unstable or in flux!

View File

@ -174,8 +174,7 @@ class IMAPFolder(BaseFolder):
# but some IMAP servers nonetheless choke on 1902.
date = imaplib.Time2Internaldate(time.localtime())
if content.find("\r\n") == -1: # Convert line endings if not already
content = content.replace("\n", "\r\n")
content = re.sub("[^\r]\n", "\r\n", content)
(headername, headervalue) = self.savemessage_getnewheader(content)
content = self.savemessage_addheader(content, headername,