From 432505bf5706cd0146cd80cbb8e75128235f1dac Mon Sep 17 00:00:00 2001 From: "naving%netscape.com" Date: Fri, 29 Jun 2001 06:00:47 +0000 Subject: [PATCH] 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. --- mailnews/imap/src/nsImapMailFolder.cpp | 19 +++++++++++-------- mailnews/imap/src/nsImapProtocol.cpp | 3 +-- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/mailnews/imap/src/nsImapMailFolder.cpp b/mailnews/imap/src/nsImapMailFolder.cpp index b68f9dd9bbb..9c8433602d4 100644 --- a/mailnews/imap/src/nsImapMailFolder.cpp +++ b/mailnews/imap/src/nsImapMailFolder.cpp @@ -3886,17 +3886,20 @@ nsImapMailFolder::OnStopRunningUrl(nsIURI *aUrl, nsresult aExitCode) case nsIImapUrl::nsImapAppendDraftFromFile: if (m_copyState) { - if (folderOpen) - UpdateFolder(aWindow); - else - UpdatePendingCounts(PR_TRUE, PR_FALSE); + if (NS_SUCCEEDED(aExitCode)) + { + if (folderOpen) + UpdateFolder(aWindow); + else + UpdatePendingCounts(PR_TRUE, PR_FALSE); + } m_copyState->m_curIndex++; if (m_copyState->m_curIndex >= m_copyState->m_totalCount) { - if (m_transactionManager && m_copyState->m_undoMsgTxn) - m_transactionManager->DoTransaction(m_copyState->m_undoMsgTxn); - ClearCopyState(aExitCode); - sendEndCopyNotification = PR_TRUE; + if (m_transactionManager && m_copyState->m_undoMsgTxn) + m_transactionManager->DoTransaction(m_copyState->m_undoMsgTxn); + ClearCopyState(aExitCode); + sendEndCopyNotification = PR_TRUE; } else NS_ASSERTION(PR_FALSE, "not clearing copy state"); diff --git a/mailnews/imap/src/nsImapProtocol.cpp b/mailnews/imap/src/nsImapProtocol.cpp index e30bbb26b9a..3e8a944cf53 100644 --- a/mailnews/imap/src/nsImapProtocol.cpp +++ b/mailnews/imap/src/nsImapProtocol.cpp @@ -1158,8 +1158,7 @@ PRBool nsImapProtocol::ProcessCurrentURL() } m_lastActiveTime = PR_Now(); // ** jt -- is this the best place for time stamp SetFlag(IMAP_CLEAN_UP_URL_STATE); - if (NS_SUCCEEDED(rv) && GetConnectionStatus() >= 0 && GetServerStateParser().LastCommandSuccessful() - && m_imapMiscellaneousSink && m_runningUrl) + if (GetConnectionStatus() >= 0 && m_imapMiscellaneousSink && m_runningUrl) { m_imapMiscellaneousSink->CopyNextStreamMessage(this, m_runningUrl); WaitForFEEventCompletion();