nsIMsgLocalMailFolder.addMessageBatch() skips last line of message without line endings
Categories
(MailNews Core :: Backend, defect)
Tracking
(thunderbird_esr91 wontfix)
Tracking | Status | |
---|---|---|
thunderbird_esr91 | --- | wontfix |
People
(Reporter: benc, Assigned: benc)
References
Details
Attachments
(2 files)
The implementation of nsIMsgLocalMailFolder.addMessageBatch() was leaving off the trailing line of any messages without a final line ending.
It uses nsParseNewMailState, which reads messages line-by-line (it's derived from nsMsgLineBuffer). But it only processes lines with a line ending. To process anything left over, Flush() needs to be called, and addMessageBatch() doens't do that.
addMessageBatch() is only used by test code.
Some generated test messages don't have a trailing line ending, although I think that it is masked elsewhere, where a synthetic '\n' is added.
Assignee | ||
Comment 1•3 years ago
|
||
Assignee | ||
Comment 2•3 years ago
|
||
addMessageBatch() was leaving off the trailing line of any messages without
a final line ending. It uses nsParseNewMailState (derived from
nsMsgLineBuffer), which doesn't process trailing data unless
nsMsgLineBuffer::Flush() is called.
This patch also fixes nsMsgLineBuffer::Flush().
Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/c1f290667663
Fix test_ext_messages_get.js to not rely on synthesised LF in test message. r=mkmelin
https://hg.mozilla.org/comm-central/rev/9014e82d837d
Fix nsIMsgLocalMailFolder addMessageBatch() for messages without trailing CRLF. r=mkmelin
Assignee | ||
Updated•3 years ago
|
Description
•