From 412a6398cdabe4fd3c7a564951f21b83b66bbce9 Mon Sep 17 00:00:00 2001 From: "bienvenu%netscape.com" Date: Wed, 3 Oct 2001 03:47:54 +0000 Subject: [PATCH] blow away corrupt history dbs r=naving sr=sspitzer 102319 --- mailnews/addrbook/src/nsAbAddressCollecter.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mailnews/addrbook/src/nsAbAddressCollecter.cpp b/mailnews/addrbook/src/nsAbAddressCollecter.cpp index 6e0a2767c6d3..cbe660d05668 100644 --- a/mailnews/addrbook/src/nsAbAddressCollecter.cpp +++ b/mailnews/addrbook/src/nsAbAddressCollecter.cpp @@ -246,7 +246,14 @@ nsresult nsAbAddressCollecter::OpenHistoryAB(nsIAddrDatabase **aDatabase) do_GetService(kAddressBookDBCID, &rv); if (NS_SUCCEEDED(rv) && addrDBFactory) + { rv = addrDBFactory->Open(dbPath, PR_TRUE, aDatabase, PR_TRUE); + if (!NS_SUCCEEDED(rv)) + { + // blow away corrupt db's + dbPath->Delete(PR_FALSE); + } + } delete dbPath; } nsCOMPtr rdfService(do_GetService(kRDFServiceCID, &rv));