mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
fix 273063 clicking on partial download link in pop3 message leaves dup msg in folder, sr=mscott
This commit is contained in:
parent
529069672c
commit
8d619d77ff
@ -3194,21 +3194,39 @@ nsMsgLocalMailFolder::OnStopRunningUrl(nsIURI * aUrl, nsresult aExitCode)
|
||||
nsCAutoString aSpec;
|
||||
aUrl->GetSpec(aSpec);
|
||||
|
||||
if (strstr(aSpec.get(), "uidl=") && msgWindow)
|
||||
if (strstr(aSpec.get(), "uidl="))
|
||||
{
|
||||
nsCOMPtr<nsIPop3URL> popurl = do_QueryInterface(aUrl, &rv);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
nsXPIDLCString messageuri;
|
||||
rv = popurl->GetMessageUri(getter_Copies(messageuri));
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
nsCOMPtr<nsIRDFService> rdfService =
|
||||
do_GetService("@mozilla.org/rdf/rdf-service;1", &rv);
|
||||
if(NS_SUCCEEDED(rv))
|
||||
{
|
||||
nsCOMPtr <nsIMsgDBHdr> msgDBHdr;
|
||||
rv = GetMsgDBHdrFromURI(messageuri, getter_AddRefs(msgDBHdr));
|
||||
if(NS_SUCCEEDED(rv))
|
||||
rv = mDatabase->DeleteHeader(msgDBHdr, nsnull, PR_TRUE,
|
||||
PR_TRUE);
|
||||
nsCOMPtr<nsIPop3Sink> pop3sink;
|
||||
nsXPIDLCString newMessageUri;
|
||||
rv = popurl->GetPop3Sink(getter_AddRefs(pop3sink));
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
pop3sink->GetMessageUri(getter_Copies(newMessageUri));
|
||||
if(msgWindow)
|
||||
{
|
||||
msgWindow->SelectMessage(newMessageUri);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mFlags & MSG_FOLDER_FLAG_INBOX)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user