83831 r=bienveu sr=mscott; don;t update the count if the copy has failed

and also continue to copy messsages even if one fails inbetween, for
multiple messages.
This commit is contained in:
naving%netscape.com 2001-06-29 06:00:47 +00:00
Родитель aa39bdfb4e
Коммит 432505bf57
2 изменённых файлов: 12 добавлений и 10 удалений

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

@ -3886,17 +3886,20 @@ nsImapMailFolder::OnStopRunningUrl(nsIURI *aUrl, nsresult aExitCode)
case nsIImapUrl::nsImapAppendDraftFromFile: case nsIImapUrl::nsImapAppendDraftFromFile:
if (m_copyState) if (m_copyState)
{ {
if (folderOpen) if (NS_SUCCEEDED(aExitCode))
UpdateFolder(aWindow); {
else if (folderOpen)
UpdatePendingCounts(PR_TRUE, PR_FALSE); UpdateFolder(aWindow);
else
UpdatePendingCounts(PR_TRUE, PR_FALSE);
}
m_copyState->m_curIndex++; m_copyState->m_curIndex++;
if (m_copyState->m_curIndex >= m_copyState->m_totalCount) if (m_copyState->m_curIndex >= m_copyState->m_totalCount)
{ {
if (m_transactionManager && m_copyState->m_undoMsgTxn) if (m_transactionManager && m_copyState->m_undoMsgTxn)
m_transactionManager->DoTransaction(m_copyState->m_undoMsgTxn); m_transactionManager->DoTransaction(m_copyState->m_undoMsgTxn);
ClearCopyState(aExitCode); ClearCopyState(aExitCode);
sendEndCopyNotification = PR_TRUE; sendEndCopyNotification = PR_TRUE;
} }
else else
NS_ASSERTION(PR_FALSE, "not clearing copy state"); NS_ASSERTION(PR_FALSE, "not clearing copy state");

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

@ -1158,8 +1158,7 @@ PRBool nsImapProtocol::ProcessCurrentURL()
} }
m_lastActiveTime = PR_Now(); // ** jt -- is this the best place for time stamp m_lastActiveTime = PR_Now(); // ** jt -- is this the best place for time stamp
SetFlag(IMAP_CLEAN_UP_URL_STATE); SetFlag(IMAP_CLEAN_UP_URL_STATE);
if (NS_SUCCEEDED(rv) && GetConnectionStatus() >= 0 && GetServerStateParser().LastCommandSuccessful() if (GetConnectionStatus() >= 0 && m_imapMiscellaneousSink && m_runningUrl)
&& m_imapMiscellaneousSink && m_runningUrl)
{ {
m_imapMiscellaneousSink->CopyNextStreamMessage(this, m_runningUrl); m_imapMiscellaneousSink->CopyNextStreamMessage(this, m_runningUrl);
WaitForFEEventCompletion(); WaitForFEEventCompletion();