From c183201b4c723d0d163f1366d4388b217d9b2859 Mon Sep 17 00:00:00 2001 From: "timeless%mac.com" Date: Tue, 21 Aug 2001 23:49:54 +0000 Subject: [PATCH] 1.206 21 Aug 2001 11:39 checked in ^Ms while fixing Bug #68296 a=bustage,sheriffs#mozilla --- mailnews/imap/src/nsImapIncomingServer.cpp | 68 +++++++++++----------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/mailnews/imap/src/nsImapIncomingServer.cpp b/mailnews/imap/src/nsImapIncomingServer.cpp index 31d47011e26..a55ebc72c61 100644 --- a/mailnews/imap/src/nsImapIncomingServer.cpp +++ b/mailnews/imap/src/nsImapIncomingServer.cpp @@ -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 msgFolder; - nsCOMPtr 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 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 msgFolder; + nsCOMPtr 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 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 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 msgFolder; - nsCOMPtr 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 msgFolder; + nsCOMPtr subFolder; + if (rootMsgFolder && aName && (*aName)) + { + rv = rootMsgFolder->FindSubFolder(folderCName.get(), getter_AddRefs(subFolder)); + if (NS_SUCCEEDED(rv)) + msgFolder = do_QueryInterface(subFolder); } nsCOMPtr queue;