fix clearing of copy request when copying local folders across accounts r/a=sspitzer, sr=mscott 206408

This commit is contained in:
bienvenu%nventure.com 2003-11-24 15:36:37 +00:00
Родитель 4f58ac90ab
Коммит 647aeea81c
1 изменённых файлов: 5 добавлений и 6 удалений

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

@ -353,7 +353,7 @@ nsMsgCopyService::FindRequest(nsISupports* aSupport,
nsresult rv = NS_OK; nsresult rv = NS_OK;
PRBool isServer=PR_FALSE; PRBool isServer=PR_FALSE;
dstFolder->GetIsServer(&isServer); dstFolder->GetIsServer(&isServer);
if (isServer) if (!isServer)
rv = dstFolder->GetParentMsgFolder(getter_AddRefs(parentMsgFolder)); rv = dstFolder->GetParentMsgFolder(getter_AddRefs(parentMsgFolder));
if ((NS_FAILED(rv)) || (!parentMsgFolder && !isServer) || (copyRequest->m_dstFolder.get() != parentMsgFolder)) if ((NS_FAILED(rv)) || (!parentMsgFolder && !isServer) || (copyRequest->m_dstFolder.get() != parentMsgFolder))
{ {
@ -543,13 +543,13 @@ nsMsgCopyService::CopyFileMessage(nsIFileSpec* fileSpec,
nsIMsgDBHdr* msgToReplace, nsIMsgDBHdr* msgToReplace,
PRBool isDraft, PRBool isDraft,
nsIMsgCopyServiceListener* listener, nsIMsgCopyServiceListener* listener,
nsIMsgWindow* window) nsIMsgWindow* window)
{ {
nsresult rv = NS_ERROR_NULL_POINTER; nsresult rv = NS_ERROR_NULL_POINTER;
nsCopyRequest* copyRequest; nsCopyRequest* copyRequest;
nsCopySource* copySource = nsnull; nsCopySource* copySource = nsnull;
nsCOMPtr<nsISupports> fileSupport; nsCOMPtr<nsISupports> fileSupport;
nsCOMPtr<nsITransactionManager> txnMgr; nsCOMPtr<nsITransactionManager> txnMgr;
NS_ENSURE_ARG_POINTER(fileSpec); NS_ENSURE_ARG_POINTER(fileSpec);
NS_ENSURE_ARG_POINTER(dstFolder); NS_ENSURE_ARG_POINTER(dstFolder);
@ -597,10 +597,9 @@ nsMsgCopyService::NotifyCompletion(nsISupports* aSupport,
nsresult rv; nsresult rv;
rv = DoNextCopy(); rv = DoNextCopy();
nsCopyRequest* copyRequest = FindRequest(aSupport, dstFolder); nsCopyRequest* copyRequest = FindRequest(aSupport, dstFolder);
if (copyRequest && copyRequest->m_processed)
{ if (copyRequest && copyRequest->m_processed)
ClearRequest(copyRequest, result); ClearRequest(copyRequest, result);
}
return rv; return rv;
} }