Bug 456548 - "IMAP subfolders not initialized beyond one level in GetSubFolders" [r+sr=bienvenu]
authorSiddharth Agarwal <sid1337@gmail.com>
Tue, 23 Sep 2008 22:33:38 +0100
changeset 405 e842bdf573c3ae1e87a02ae0916d9c3a4c80b8a3
parent 404 580ea3dd210c42a5c90377ef669780a667cadc8a
child 406 1f2f13351b1ff3a201c13256e96707cf5241e535
push idunknown
push userunknown
push dateunknown
bugs456548
Bug 456548 - "IMAP subfolders not initialized beyond one level in GetSubFolders" [r+sr=bienvenu]
mailnews/imap/src/nsImapMailFolder.cpp
--- a/mailnews/imap/src/nsImapMailFolder.cpp
+++ b/mailnews/imap/src/nsImapMailFolder.cpp
@@ -623,16 +623,21 @@ NS_IMETHODIMP nsImapMailFolder::GetSubFo
 
       GetFolderWithFlags(nsMsgFolderFlags::Inbox, getter_AddRefs(inboxFolder));
       if (!inboxFolder)
       {
         // create an inbox if we don't have one.
         CreateClientSubfolderInfo(NS_LITERAL_CSTRING("INBOX"), kOnlineHierarchySeparatorUnknown, 0, PR_TRUE);
       }
     }
+
+    PRInt32 count = mSubFolders.Count();
+    for (PRInt32 i = 0; i < count; i++)
+      mSubFolders[i]->GetSubFolders(nsnull);
+
     UpdateSummaryTotals(PR_FALSE);
     if (NS_FAILED(rv)) return rv;
   }
 
   return aResult ? NS_NewArrayEnumerator(aResult, mSubFolders) : NS_ERROR_NULL_POINTER;
 }
 
 //Makes sure the database is open and exists.  If the database is valid then