From 4c71ce01cc784703546c6f0c7a28e352847d9192 Mon Sep 17 00:00:00 2001 From: "bienvenu%netscape.com" Date: Wed, 9 May 2001 13:39:04 +0000 Subject: [PATCH] fix hang emptying trash on exit while offline r=naving, sr=sspitzer 78825 --- mailnews/imap/src/nsImapMailFolder.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mailnews/imap/src/nsImapMailFolder.cpp b/mailnews/imap/src/nsImapMailFolder.cpp index a60fea5d5e8..2cd27d67078 100644 --- a/mailnews/imap/src/nsImapMailFolder.cpp +++ b/mailnews/imap/src/nsImapMailFolder.cpp @@ -1088,6 +1088,10 @@ NS_IMETHODIMP nsImapMailFolder::EmptyTrash(nsIMsgWindow *msgWindow, rv = imapService->DeleteAllMessages(m_eventQueue, trashFolder, urlListener, nsnull); } + // return an error if this failed. We want the empty trash on exit code + // to know if this fails so that it doesn't block waiting for empty trash to finish. + if (NS_FAILED(rv)) + return rv; } PRBool hasSubfolders = PR_FALSE; rv = trashFolder->GetHasSubFolders(&hasSubfolders);