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

This commit is contained in:
bienvenu%nventure.com 2004-12-06 02:26:27 +00:00
parent f27126d0af
commit c2433b5d62

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;