fix handling of corrupt imap .msf files, sr=mscott patch in 259434

git-svn-id: svn://10.0.0.236/trunk@166290 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bienvenu%nventure.com
2004-12-06 02:26:27 +00:00
parent 4e84cc815d
commit 32cfb997a7

View File

@@ -676,8 +676,15 @@ nsresult nsImapMailFolder::GetDatabase(nsIMsgWindow *aMsgWindow)
if (NS_FAILED(rv)) return rv;
nsCOMPtr<nsIMsgDBService> msgDBService = do_GetService(NS_MSGDB_SERVICE_CONTRACTID, &rv);
if (msgDBService)
folderOpen = msgDBService->OpenFolderDB(this, PR_TRUE, PR_FALSE, getter_AddRefs(mDatabase));
NS_ENSURE_SUCCESS(rv, rv);
folderOpen = msgDBService->OpenFolderDB(this, PR_TRUE, PR_FALSE, getter_AddRefs(mDatabase));
if (NS_FAILED(folderOpen) && folderOpen != NS_MSG_ERROR_FOLDER_SUMMARY_MISSING)
folderOpen = msgDBService->OpenFolderDB(this, PR_TRUE, PR_TRUE, getter_AddRefs(mDatabase));
if (NS_FAILED(folderOpen) && folderOpen != NS_MSG_ERROR_FOLDER_SUMMARY_MISSING)
return folderOpen;
if(folderOpen == NS_MSG_ERROR_FOLDER_SUMMARY_MISSING)
folderOpen = NS_OK;