fixed bug 12921, 12922 - duplicate folders in folder view

This commit is contained in:
jefft%netscape.com 1999-09-01 05:42:02 +00:00
parent e47c2b4fe6
commit f148c5748c

View File

@ -430,9 +430,14 @@ NS_IMETHODIMP nsImapMailFolder::GetMessages(nsISimpleEnumerator* *result)
{
if (!m_haveDiscoveredAllFolders)
{
rv = CreateClientSubfolderInfo("Inbox");
if (NS_FAILED(rv))
return rv;
PRBool hasSubFolders = PR_FALSE;
GetHasSubFolders(&hasSubFolders);
if (!hasSubFolders)
{
rv = CreateClientSubfolderInfo("Inbox");
if (NS_FAILED(rv))
return rv;
}
m_haveDiscoveredAllFolders = PR_TRUE;
}
selectFolder = PR_FALSE;
@ -2648,22 +2653,6 @@ nsImapMailFolder::OnStopRunningUrl(nsIURI *aUrl, nsresult aExitCode)
}
}
break;
case nsIImapUrl::nsImapCreateFolder:
{
char *path = nsnull;
rv = imapUrl->CreateCanonicalSourceFolderPathString(&path);
if (NS_SUCCEEDED(rv))
{
nsCOMPtr<nsIMsgImapMailFolder> imapFolder;
rv = QueryInterface(nsCOMTypeInfo
<nsIMsgImapMailFolder>::GetIID(),
getter_AddRefs(imapFolder));
if (NS_SUCCEEDED(rv))
imapFolder->CreateClientSubfolderInfo(path);
PR_FREEIF(path);
}
}
break;
default:
break;
}