зеркало из https://github.com/mozilla/pjs.git
84334 r=mscott sr=bienvenu a=asa; Clear the copystate and truncate the mailbox file to the beginning of the last message.
This commit is contained in:
Родитель
3cf382d062
Коммит
a57608dc2c
|
@ -2239,6 +2239,19 @@ NS_IMETHODIMP nsMsgLocalMailFolder::EndCopy(PRBool copySucceeded)
|
|||
{
|
||||
// we are the destination folder for a move/copy
|
||||
nsresult rv = copySucceeded ? NS_OK : NS_ERROR_FAILURE;
|
||||
if (!mCopyState) return NS_OK;
|
||||
if (!copySucceeded)
|
||||
{
|
||||
if (mCopyState->m_fileStream)
|
||||
mCopyState->m_fileStream->close();
|
||||
nsCOMPtr <nsIFileSpec> pathSpec;
|
||||
rv = GetPath(getter_AddRefs(pathSpec));
|
||||
if (NS_SUCCEEDED(rv) && pathSpec)
|
||||
pathSpec->Truncate(mCopyState->m_curDstKey);
|
||||
ClearCopyState(PR_FALSE);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsLocalMoveCopyMsgTxn> localUndoTxn;
|
||||
nsCOMPtr<nsIMsgWindow> msgWindow;
|
||||
PRBool multipleCopiesFinished = (mCopyState->m_curCopyIndex >= mCopyState->m_totalMsgCount);
|
||||
|
|
|
@ -329,12 +329,6 @@ NS_IMETHODIMP nsMailboxProtocol::OnStopRequest(nsIRequest *request, nsISupports
|
|||
// is coming from netlib so they are never going to ping us again with on data available. This means
|
||||
// we'll never be going through the Process loop...
|
||||
|
||||
/* mscott - the NS_BINDING_ABORTED is a hack to get around a problem I have
|
||||
with the necko code...it returns this and treats it as an error when
|
||||
it really isn't an error! I'm trying to get them to change this.
|
||||
*/
|
||||
if (aStatus == NS_BINDING_ABORTED)
|
||||
aStatus = NS_OK;
|
||||
if (m_multipleMsgMoveCopyStream)
|
||||
{
|
||||
m_multipleMsgMoveCopyStream->Close();
|
||||
|
|
Загрузка…
Ссылка в новой задаче