1.206 <cavin@netscape.com> 21 Aug 2001 11:39 checked in ^Ms while fixing Bug #68296

a=bustage,sheriffs#mozilla
This commit is contained in:
timeless%mac.com 2001-08-21 23:49:54 +00:00
Родитель 91188a72aa
Коммит c183201b4c
1 изменённых файлов: 34 добавлений и 34 удалений

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

@ -1056,27 +1056,27 @@ NS_IMETHODIMP nsImapIncomingServer::PossibleImapMailbox(const char *folderPath,
if (NS_FAILED(rv))
return rv;
if (mDoingSubscribeDialog)
{
rv = AddTo(folderPath, mDoingLsub /* add as subscribed */, mDoingLsub /* change if exists */);
NS_ENSURE_SUCCESS(rv,rv);
// Make sure the imapmailfolder object has the right delimiter because the unsubscribed
// folders (those not in the 'lsub' list) have the delimiter set to the default ('^').
if (a_nsIFolder && folderPath && (*folderPath))
{
nsCOMPtr<nsIMsgFolder> msgFolder;
nsCOMPtr<nsIFolder> subFolder;
rv = a_nsIFolder->FindSubFolder(folderPath, getter_AddRefs(subFolder));
NS_ENSURE_SUCCESS(rv,rv);
msgFolder = do_QueryInterface(subFolder, &rv);
NS_ENSURE_SUCCESS(rv,rv);
nsCOMPtr<nsIMsgImapMailFolder> imapFolder = do_QueryInterface(msgFolder, &rv);
NS_ENSURE_SUCCESS(rv,rv);
imapFolder->SetHierarchyDelimiter(hierarchyDelimiter);
return rv;
}
}
if (mDoingSubscribeDialog)
{
rv = AddTo(folderPath, mDoingLsub /* add as subscribed */, mDoingLsub /* change if exists */);
NS_ENSURE_SUCCESS(rv,rv);
// Make sure the imapmailfolder object has the right delimiter because the unsubscribed
// folders (those not in the 'lsub' list) have the delimiter set to the default ('^').
if (a_nsIFolder && folderPath && (*folderPath))
{
nsCOMPtr<nsIMsgFolder> msgFolder;
nsCOMPtr<nsIFolder> subFolder;
rv = a_nsIFolder->FindSubFolder(folderPath, getter_AddRefs(subFolder));
NS_ENSURE_SUCCESS(rv,rv);
msgFolder = do_QueryInterface(subFolder, &rv);
NS_ENSURE_SUCCESS(rv,rv);
nsCOMPtr<nsIMsgImapMailFolder> imapFolder = do_QueryInterface(msgFolder, &rv);
NS_ENSURE_SUCCESS(rv,rv);
imapFolder->SetHierarchyDelimiter(hierarchyDelimiter);
return rv;
}
}
hostFolder = do_QueryInterface(a_nsIFolder, &rv);
if (NS_FAILED(rv))
@ -2847,19 +2847,19 @@ nsImapIncomingServer::SubscribeToFolder(const PRUnichar *aName, PRBool subscribe
if (NS_FAILED(rv)) return rv;
nsCOMPtr<nsIMsgFolder> rootMsgFolder = do_QueryInterface(rootFolder, &rv);
if (NS_FAILED(rv)) return rv;
if (!rootMsgFolder) return NS_ERROR_FAILURE;
// Locate the folder so that the correct hierarchical delimiter is used in the
// folder pathnames, otherwise root's (ie, '^') is used and this is wrong.
nsCAutoString folderCName;
folderCName.AppendWithConversion(aName);
nsCOMPtr<nsIMsgFolder> msgFolder;
nsCOMPtr<nsIFolder> subFolder;
if (rootMsgFolder && aName && (*aName))
{
rv = rootMsgFolder->FindSubFolder(folderCName.get(), getter_AddRefs(subFolder));
if (NS_SUCCEEDED(rv))
msgFolder = do_QueryInterface(subFolder);
if (!rootMsgFolder) return NS_ERROR_FAILURE;
// Locate the folder so that the correct hierarchical delimiter is used in the
// folder pathnames, otherwise root's (ie, '^') is used and this is wrong.
nsCAutoString folderCName;
folderCName.AppendWithConversion(aName);
nsCOMPtr<nsIMsgFolder> msgFolder;
nsCOMPtr<nsIFolder> subFolder;
if (rootMsgFolder && aName && (*aName))
{
rv = rootMsgFolder->FindSubFolder(folderCName.get(), getter_AddRefs(subFolder));
if (NS_SUCCEEDED(rv))
msgFolder = do_QueryInterface(subFolder);
}
nsCOMPtr<nsIEventQueue> queue;