fix crash cancelling msg copy operation, r=neil.parkwaycc.co.uk, sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@147457 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -287,11 +287,17 @@ nsMsgCopyService::DoNextCopy()
|
||||
}
|
||||
else if (copyRequest->m_requestType == nsCopyFoldersType )
|
||||
{
|
||||
copySource->m_processed = PR_TRUE;
|
||||
copySource->m_processed = PR_TRUE;
|
||||
rv = copyRequest->m_dstFolder->CopyFolder
|
||||
(copySource->m_msgFolder,
|
||||
copyRequest->m_isMoveOrDraftOrTemplate,
|
||||
copyRequest->m_msgWindow, copyRequest->m_listener);
|
||||
// If it's a copy folder operation and the destination
|
||||
// folder already exists, CopyFolder() returns an error w/o sending
|
||||
// a completion notification, so clear it here.
|
||||
if (NS_FAILED(rv))
|
||||
ClearRequest(copyRequest, rv);
|
||||
|
||||
}
|
||||
else if (copyRequest->m_requestType == nsCopyFileMessageType)
|
||||
{
|
||||
@@ -318,14 +324,6 @@ nsMsgCopyService::DoNextCopy()
|
||||
}
|
||||
}
|
||||
}
|
||||
// Don't clear copy request in failure case - notify completion should do that.
|
||||
// Hmm, this is not true in case it's a copy folder opeation and the destination
|
||||
// folder already exists. In this case CopyFolder() returns an error and there
|
||||
// won't be completion notification at all and the request will stay in the
|
||||
// queue forever.
|
||||
if (NS_FAILED(rv))
|
||||
ClearRequest(copyRequest, rv);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user