From 8000e367d835df20ef4f09a220c7c882423bca73 Mon Sep 17 00:00:00 2001 From: "naving%netscape.com" Date: Wed, 6 Jun 2001 03:32:19 +0000 Subject: [PATCH] 50572 r=bienvenu sr=mscott a=pdt. check if the folder is noSelect folder and return appropriately --- mailnews/imap/src/nsImapIncomingServer.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/mailnews/imap/src/nsImapIncomingServer.cpp b/mailnews/imap/src/nsImapIncomingServer.cpp index 499dc87cae7..6f35bced256 100644 --- a/mailnews/imap/src/nsImapIncomingServer.cpp +++ b/mailnews/imap/src/nsImapIncomingServer.cpp @@ -1273,11 +1273,19 @@ NS_IMETHODIMP nsImapIncomingServer::OnlineFolderRename(const char *oldName, cons NS_IMETHODIMP nsImapIncomingServer::FolderIsNoSelect(const char *aFolderName, PRBool *result) { - if (!result) - return NS_ERROR_NULL_POINTER; - - *result = PR_FALSE; - return NS_OK; + if (!result) + return NS_ERROR_NULL_POINTER; + nsCOMPtr msgFolder; + nsresult rv = GetFolder(aFolderName, getter_AddRefs(msgFolder)); + if (NS_SUCCEEDED(rv) && msgFolder) + { + PRUint32 flags; + msgFolder->GetFlags(&flags); + *result = ((flags & MSG_FOLDER_FLAG_IMAP_NOSELECT) != 0); + } + else + *result = PR_FALSE; + return NS_OK; } NS_IMETHODIMP nsImapIncomingServer::SetFolderAdminURL(const char *aFolderName, const char *aFolderAdminUrl)