summaryrefslogtreecommitdiffstats
path: root/mailnews/local/src/nsLocalMailFolder.cpp
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-11-10 20:27:19 -0500
committerMatt A. Tobin <email@mattatobin.com>2019-11-10 20:27:19 -0500
commit1f5f6a4bf0163f4dcf0fd6778611891165c334ff (patch)
treeb4211330b96a89b66c838c116dbc379159c62ed6 /mailnews/local/src/nsLocalMailFolder.cpp
parent4d20783c0aa26ced30b55c3eaaab76f46a01a803 (diff)
downloadUXP-1f5f6a4bf0163f4dcf0fd6778611891165c334ff.tar
UXP-1f5f6a4bf0163f4dcf0fd6778611891165c334ff.tar.gz
UXP-1f5f6a4bf0163f4dcf0fd6778611891165c334ff.tar.lz
UXP-1f5f6a4bf0163f4dcf0fd6778611891165c334ff.tar.xz
UXP-1f5f6a4bf0163f4dcf0fd6778611891165c334ff.zip
Bug 1317117 - call msgStore folder deletion during imap/news empty trash.
Also factors out some common code into nsMSgDBFolder::Delete(), and makes a couple of incidental changes to try and clarify the responsibilies of nsIMsgPluggableStore::DeleteFolder(). Tag #1273
Diffstat (limited to 'mailnews/local/src/nsLocalMailFolder.cpp')
-rw-r--r--mailnews/local/src/nsLocalMailFolder.cpp39
1 files changed, 0 insertions, 39 deletions
diff --git a/mailnews/local/src/nsLocalMailFolder.cpp b/mailnews/local/src/nsLocalMailFolder.cpp
index 00244ca87..78991ebfd 100644
--- a/mailnews/local/src/nsLocalMailFolder.cpp
+++ b/mailnews/local/src/nsLocalMailFolder.cpp
@@ -653,8 +653,6 @@ NS_IMETHODIMP nsMsgLocalMailFolder::EmptyTrash(nsIMsgWindow *msgWindow,
if (NS_SUCCEEDED(rv))
{
uint32_t flags;
- nsCString trashUri;
- trashFolder->GetURI(trashUri);
trashFolder->GetFlags(&flags);
int32_t totalMessages = 0;
rv = trashFolder->GetTotalMessages(true, &totalMessages);
@@ -750,43 +748,6 @@ nsresult nsMsgLocalMailFolder::IsChildOfTrash(bool *result)
return rv;
}
-NS_IMETHODIMP nsMsgLocalMailFolder::Delete()
-{
- nsresult rv;
- nsCOMPtr<nsIMsgDBService> msgDBService = do_GetService(NS_MSGDB_SERVICE_CONTRACTID, &rv);
- NS_ENSURE_SUCCESS(rv, rv);
- msgDBService->CachedDBForFolder(this, getter_AddRefs(mDatabase));
- if (mDatabase)
- {
- mDatabase->ForceClosed();
- mDatabase = nullptr;
- }
-
- nsCOMPtr<nsIMsgIncomingServer> server;
- rv = GetServer(getter_AddRefs(server));
- NS_ENSURE_SUCCESS(rv, rv);
-
- nsCOMPtr<nsIMsgPluggableStore> msgStore;
-
- rv = server->GetMsgStore(getter_AddRefs(msgStore));
- NS_ENSURE_SUCCESS(rv, rv);
-
- nsCOMPtr <nsIFile> summaryFile;
- rv = GetSummaryFile(getter_AddRefs(summaryFile));
- NS_ENSURE_SUCCESS(rv, rv);
-
- //Clean up .sbd folder if it exists.
- // Remove summary file.
- rv = summaryFile->Remove(false);
- NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Could not delete msg summary file");
-
- rv = msgStore->DeleteFolder(this);
- if (rv == NS_ERROR_FILE_NOT_FOUND ||
- rv == NS_ERROR_FILE_TARGET_DOES_NOT_EXIST)
- rv = NS_OK; // virtual folders do not have a msgStore file
- return rv;
-}
-
NS_IMETHODIMP nsMsgLocalMailFolder::DeleteSubFolders(nsIArray *folders, nsIMsgWindow *msgWindow)
{
nsresult rv;