fixed bug 9540, 10827, 11991 - copy news article failed on certain platforms; replacing CRLF to platform specific MSG_LINEBREAK; reviewed by mscott
git-svn-id: svn://10.0.0.236/trunk@49822 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1683,20 +1683,23 @@ NS_IMETHODIMP nsImapMailFolder::CopyData(nsIInputStream *aIStream,
|
||||
m_copyState->m_dataBuffer[readCount] = '\0';
|
||||
|
||||
start = m_copyState->m_dataBuffer;
|
||||
end = PL_strstr(start, CRLF);
|
||||
end = PL_strstr(start, MSG_LINEBREAK);
|
||||
|
||||
while (start && end)
|
||||
{
|
||||
if (PL_strncasecmp(start, "X-Mozilla-Status:", 17) &&
|
||||
PL_strncasecmp(start, "X-Mozilla-Status2:", 18) &&
|
||||
PL_strncmp(start, "From - ", 7))
|
||||
{
|
||||
rv = m_copyState->m_tmpFileSpec->Write(start,
|
||||
end-start+2,
|
||||
end-start,
|
||||
&writeCount);
|
||||
start = end+2;
|
||||
rv = m_copyState->m_tmpFileSpec->Write(CRLF, 2, &writeCount);
|
||||
}
|
||||
start = end+MSG_LINEBREAK_LEN;
|
||||
if (start >= m_copyState->m_dataBuffer+readCount)
|
||||
break;
|
||||
end = PL_strstr(start, CRLF);
|
||||
end = PL_strstr(start, MSG_LINEBREAK);
|
||||
}
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
aLength -= readCount;
|
||||
|
||||
Reference in New Issue
Block a user