mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-28 11:27:32 +09:00
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
This commit is contained in:
parent
0ef88cc19d
commit
0f885aaad1
8 changed files with 77 additions and 139 deletions
|
|
@ -495,41 +495,8 @@ NS_IMETHODIMP nsMsgNewsFolder::CreateSubfolder(const nsAString& newsgroupName,
|
|||
|
||||
NS_IMETHODIMP nsMsgNewsFolder::Delete()
|
||||
{
|
||||
nsresult rv = GetDatabase();
|
||||
|
||||
if(NS_SUCCEEDED(rv))
|
||||
{
|
||||
mDatabase->ForceClosed();
|
||||
mDatabase = nullptr;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIFile> folderPath;
|
||||
rv = GetFilePath(getter_AddRefs(folderPath));
|
||||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
nsCOMPtr<nsIFile> summaryPath;
|
||||
rv = GetSummaryFileLocation(folderPath, getter_AddRefs(summaryPath));
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
bool exists = false;
|
||||
rv = folderPath->Exists(&exists);
|
||||
|
||||
if (NS_SUCCEEDED(rv) && exists)
|
||||
rv = folderPath->Remove(false);
|
||||
|
||||
if (NS_FAILED(rv))
|
||||
NS_WARNING("Failed to remove News Folder");
|
||||
|
||||
rv = summaryPath->Exists(&exists);
|
||||
|
||||
if (NS_SUCCEEDED(rv) && exists)
|
||||
rv = summaryPath->Remove(false);
|
||||
|
||||
if (NS_FAILED(rv))
|
||||
NS_WARNING("Failed to remove News Folder Summary File");
|
||||
}
|
||||
}
|
||||
nsresult rv = nsMsgDBFolder::Delete();
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr <nsINntpIncomingServer> nntpServer;
|
||||
rv = GetNntpServer(getter_AddRefs(nntpServer));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue