/offlineimap/head: changeset 448

Fixed the regular expression that fixes line endings to make sure to
deal with \n\n properly.
This commit is contained in:
jgoerzen
2003-04-19 02:44:10 +01:00
parent 2288c0d37a
commit 0373766d70
2 changed files with 3 additions and 1 deletions

View File

@ -174,7 +174,7 @@ class IMAPFolder(BaseFolder):
# but some IMAP servers nonetheless choke on 1902.
date = imaplib.Time2Internaldate(time.localtime())
content = re.sub("([^\r])\n", "\\1\r\n", content)
content = re.sub("(?<!\r)\n", "\r\n", content)
(headername, headervalue) = self.savemessage_getnewheader(content)
content = self.savemessage_addheader(content, headername,