fix 471130 import of OE fails because we're not handling missing/out of date msf files for local db's correctly, r/sr=bienvenu
authorPhil Lacy <philbaseless-firefox@yahoo.com>
Mon, 19 Jan 2009 16:02:50 -0800
changeset 1697 825f066d21c273854ce1b49b278c39b6f1f258de
parent 1696 f384b7b8145235136b350323c931b0cbc3d56fa5
child 1698 84e9c5177712642bda6894f260c9310f4aaec932
push id1361
push userbienvenu@nventure.com
push dateTue, 20 Jan 2009 00:02:47 +0000
treeherdercomm-central@825f066d21c2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs471130
fix 471130 import of OE fails because we're not handling missing/out of date msf files for local db's correctly, r/sr=bienvenu
mailnews/local/src/nsLocalMailFolder.cpp
--- a/mailnews/local/src/nsLocalMailFolder.cpp
+++ b/mailnews/local/src/nsLocalMailFolder.cpp
@@ -461,17 +461,19 @@ NS_IMETHODIMP nsMsgLocalMailFolder::GetD
   nsresult rv = NS_OK;
   if (!mDatabase)
   {
     nsCOMPtr<nsIMsgDBService> msgDBService = do_GetService(NS_MSGDB_SERVICE_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
     
     rv = msgDBService->OpenFolderDB(this, PR_TRUE, getter_AddRefs(mDatabase));
 
-    if (mDatabase && NS_SUCCEEDED(rv))
+    if (NS_FAILED(rv))
+      mDatabase = nsnull;   // comment to this function above states failure expects null db returned
+    if (mDatabase)
     {
       mDatabase->AddListener(this);
       UpdateNewMessages();
     }
   }
   NS_IF_ADDREF(*aDatabase = mDatabase);
   return rv;
 }