fix problem with messed up imap folder hierarchy, folder names in server.msf files 72854 and 72871 sr=sspitzer

This commit is contained in:
bienvenu%netscape.com 2001-03-31 02:50:11 +00:00
Родитель 661c26b99c
Коммит 4556ca5d28
2 изменённых файлов: 9 добавлений и 4 удалений

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

@ -1881,7 +1881,12 @@ nsresult nsImapIncomingServer::GetUnverifiedFolders(nsISupportsArray *aFoldersAr
nsCOMPtr<nsIFolder> rootFolder;
nsresult rv = GetRootFolder(getter_AddRefs(rootFolder));
if(NS_SUCCEEDED(rv) && rootFolder)
{
nsCOMPtr <nsIMsgImapMailFolder> imapRoot = do_QueryInterface(rootFolder);
if (imapRoot)
imapRoot->SetVerifiedAsOnlineFolder(PR_TRUE); // don't need to verify the root.
rv = GetUnverifiedSubFolders(rootFolder, aFoldersArray, aNumUnverifiedFolders);
}
return rv;
}

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

@ -481,6 +481,7 @@ NS_IMETHODIMP nsImapMailFolder::GetSubFolders(nsIEnumerator* *result)
if (path.IsDirectory())
{
newFlags |= (MSG_FOLDER_FLAG_DIRECTORY | MSG_FOLDER_FLAG_ELIDED);
if (!mIsServer)
SetFlag(newFlags);
rv = CreateSubFolders(path);
}
@ -758,7 +759,7 @@ NS_IMETHODIMP nsImapMailFolder::CreateClientSubfolderInfo(const char *folderName
path.SetLeafName(proposedDBName);
NS_NewFileSpecWithSpec(path, getter_AddRefs(dbFileSpec));
rv = mailDBFactory->OpenFolderDB(this, PR_TRUE, PR_TRUE, (nsIMsgDatabase **) getter_AddRefs(unusedDB));
rv = mailDBFactory->Open(dbFileSpec, PR_TRUE, PR_TRUE, (nsIMsgDatabase **) getter_AddRefs(unusedDB));
if (NS_SUCCEEDED(rv) && unusedDB)
{
@ -1304,7 +1305,7 @@ NS_IMETHODIMP nsImapMailFolder::GetFolderURL(char **url)
NS_IMETHODIMP nsImapMailFolder::UpdateSummaryTotals(PRBool force)
{
if (!mNotifyCountChanges)
if (!mNotifyCountChanges || mIsServer)
return NS_OK;
// could we move this into nsMsgDBFolder, or do we need to deal
@ -1582,7 +1583,6 @@ NS_IMETHODIMP nsImapMailFolder::Adopt(nsIMsgFolder *srcFolder,
NS_IMETHODIMP nsImapMailFolder::SetOnlineName(const char * aOnlineFolderName)
{
nsresult rv;
nsCOMPtr<nsIMsgDatabase> db;
nsCOMPtr<nsIDBFolderInfo> folderInfo;
rv = GetDBFolderInfoAndDB(getter_AddRefs(folderInfo), getter_AddRefs(db));