fix bug 579168 include folder name in STATUS error string in activity manager, r/sr=standard8
authorDavid Bienvenu <bienvenu@nventure.com>
Fri, 30 Jul 2010 13:11:36 -0700
changeset 6047 b6917aa809290681d1798805cb4eba442ed91219
parent 6046 2f35246bf41f869bf79c797b9e058a5e1c8be8db
child 6048 647cf429e91ca4df510fc355d29d6203048184ec
push idunknown
push userunknown
push dateunknown
bugs579168
fix bug 579168 include folder name in STATUS error string in activity manager, r/sr=standard8
mailnews/imap/src/nsImapIncomingServer.cpp
--- a/mailnews/imap/src/nsImapIncomingServer.cpp
+++ b/mailnews/imap/src/nsImapIncomingServer.cpp
@@ -1890,23 +1890,27 @@ NS_IMETHODIMP  nsImapIncomingServer::FEA
 
   PRUint32 msgID;
   PRInt32 numStrings;
   nsString fullMessage;
   nsCOMPtr<nsIImapUrl> imapUrl = do_QueryInterface(aUrl);
   NS_ENSURE_TRUE(imapUrl, NS_ERROR_INVALID_ARG);
 
   nsImapState imapState;
+  nsImapAction imapAction;
+
   imapUrl->GetRequiredImapState(&imapState);
+  imapUrl->GetImapAction(&imapAction);
   nsString folderName;
 
   NS_ConvertUTF8toUTF16 unicodeMsg(message);
 
   nsCOMPtr<nsIMsgFolder> folder;
-  if (imapState == nsIImapUrl::nsImapSelectedState)
+  if (imapState == nsIImapUrl::nsImapSelectedState ||
+      imapAction == nsIImapUrl::nsImapFolderStatus)
   {
     aUrl->GetFolder(getter_AddRefs(folder));
     if (folder)
       folder->GetPrettyName(folderName);
     numStrings = 3;
     msgID = IMAP_FOLDER_COMMAND_FAILED;
     formatStrings[1] = folderName.get();
   }