Bug 754301 - Messages lost when downloaded and inbox corrupted - POP3 - don't try to open the database twice. r+a=Standard8 for CLOSED TREE
authorDavid Bienvenu <dbienvenu@mozilla.com>
Tue, 12 Jun 2012 19:22:43 +0100
changeset 11577 287215a8d1038b87e7f1eabeada40e7a92a08f4b
parent 11576 517b1c9384976cc1c9523483bcbbd24ff4b88418
child 11578 7e2b09db42add63846f8c80de1bd0af5551b086b
push id92
push userbugzilla@standard8.plus.com
push dateTue, 12 Jun 2012 20:00:13 +0000
bugs754301
Bug 754301 - Messages lost when downloaded and inbox corrupted - POP3 - don't try to open the database twice. r+a=Standard8 for CLOSED TREE
mailnews/local/src/nsParseMailbox.cpp
--- a/mailnews/local/src/nsParseMailbox.cpp
+++ b/mailnews/local/src/nsParseMailbox.cpp
@@ -1738,17 +1738,17 @@ nsParseNewMailState::Init(nsIMsgFolder *
   m_msgWindow = aMsgWindow;
   m_downloadFolder = downloadFolder;
 
   m_newMsgHdr = aHdr;
   m_outputStream = aOutputStream;
   // the new mail parser isn't going to get the stream input, it seems, so we can't use
   // the OnStartRequest mechanism the mailbox parser uses. So, let's open the db right now.
   nsCOMPtr<nsIMsgDBService> msgDBService = do_GetService(NS_MSGDB_SERVICE_CONTRACTID, &rv);
-  if (msgDBService)
+  if (msgDBService && !m_mailDB)
     rv = msgDBService->OpenFolderDB(downloadFolder, false,
                                     getter_AddRefs(m_mailDB));
   NS_ENSURE_SUCCESS(rv, rv);
   nsCOMPtr <nsIMsgFolder> rootMsgFolder = do_QueryInterface(serverFolder, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIMsgIncomingServer> server;
   rv = rootMsgFolder->GetServer(getter_AddRefs(server));