fix crash cancelling msg copy operation, r=neil.parkwaycc.co.uk, sr=sspitzer

This commit is contained in:
bienvenu%nventure.com 2003-09-30 15:36:15 +00:00
Родитель 5beee5f70d
Коммит 5f2958c236
1 изменённых файлов: 7 добавлений и 9 удалений

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

@ -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;
}