fix get new mail for pop, workaround PR_APPEND bustage, set m_position to file size

This commit is contained in:
bienvenu%netscape.com 1999-04-27 19:31:41 +00:00
Родитель ca3aba39b7
Коммит 63fb11d8a3
2 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -1303,6 +1303,7 @@ nsParseNewMailState::Init(MSG_Master *master, nsFileSpec &folder)
// SetMaster(master); // SetMaster(master);
m_mailboxName = nsCRT::strdup(folder); m_mailboxName = nsCRT::strdup(folder);
m_position = folder.GetFileSize();
// the new mail parser isn't going to get the stream input, it seems, so we can't use // the new mail parser isn't going to get the stream input, it seems, so we can't use
// the OnStartBinding mechanism the mailbox parser uses. So, let's open the db right now. // the OnStartBinding mechanism the mailbox parser uses. So, let's open the db right now.
nsIMsgDatabase * mailDB = nsnull; nsIMsgDatabase * mailDB = nsnull;

Просмотреть файл

@ -113,7 +113,10 @@ nsPop3Sink::BeginMailDelivery(PRBool* aBool)
nsFileSpec fileSpec(m_mailDirectory); nsFileSpec fileSpec(m_mailDirectory);
fileSpec += "Inbox"; fileSpec += "Inbox";
m_outFileStream = new nsOutputFileStream(fileSpec, m_outFileStream = new nsOutputFileStream(fileSpec,
PR_WRONLY | PR_CREATE_FILE | PR_APPEND); PR_WRONLY | PR_CREATE_FILE);
if (m_outFileStream)
m_outFileStream->seek(fileSpec.GetFileSize());
// create a new mail parser // create a new mail parser
m_newMailParser = new nsParseNewMailState; m_newMailParser = new nsParseNewMailState;