зеркало из https://github.com/mozilla/pjs.git
fix 316929 .msf files not deleted after imap folder deleted, sr=mscott
This commit is contained in:
Родитель
85d048cc14
Коммит
938992a820
|
@ -511,7 +511,7 @@ nsresult nsMsgDBFolder::ReadDBFolderInfo(PRBool force)
|
|||
{
|
||||
nsCOMPtr <nsIFileSpec> dbPath;
|
||||
|
||||
result = GetFolderCacheKey(getter_AddRefs(dbPath));
|
||||
result = GetFolderCacheKey(getter_AddRefs(dbPath), PR_TRUE /* createDBIfMissing */);
|
||||
|
||||
if (dbPath)
|
||||
{
|
||||
|
@ -1097,7 +1097,7 @@ NS_IMETHODIMP nsMsgDBFolder::ReadFromFolderCacheElem(nsIMsgFolderCacheElement *e
|
|||
return rv;
|
||||
}
|
||||
|
||||
nsresult nsMsgDBFolder::GetFolderCacheKey(nsIFileSpec **aFileSpec)
|
||||
nsresult nsMsgDBFolder::GetFolderCacheKey(nsIFileSpec **aFileSpec, PRBool createDBIfMissing /* = PR_FALSE */)
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr <nsIFileSpec> path;
|
||||
|
@ -1125,7 +1125,7 @@ nsresult nsMsgDBFolder::GetFolderCacheKey(nsIFileSpec **aFileSpec)
|
|||
// create the .msf file
|
||||
// see bug #244217 for details
|
||||
PRBool exists;
|
||||
if (NS_SUCCEEDED(dbPath->Exists(&exists)) && !exists)
|
||||
if (createDBIfMissing && NS_SUCCEEDED(dbPath->Exists(&exists)) && !exists)
|
||||
dbPath->Touch();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -136,7 +136,7 @@ protected:
|
|||
nsresult OnHdrAddedOrDeleted(nsIMsgDBHdr *hdrChanged, PRBool added);
|
||||
nsresult CreateFileSpecForDB(const char *userLeafName, nsFileSpec &baseDir, nsIFileSpec **dbFileSpec);
|
||||
|
||||
nsresult GetFolderCacheKey(nsIFileSpec **aFileSpec);
|
||||
nsresult GetFolderCacheKey(nsIFileSpec **aFileSpec, PRBool createDBIfMissing = PR_FALSE);
|
||||
nsresult GetFolderCacheElemFromFileSpec(nsIFileSpec *fileSpec, nsIMsgFolderCacheElement **cacheElement);
|
||||
nsresult AddDirectorySeparator(nsFileSpec &path);
|
||||
nsresult CheckIfFolderExists(const PRUnichar *newFolderName, nsIMsgFolder *parentFolder, nsIMsgWindow *msgWindow);
|
||||
|
|
|
@ -1041,8 +1041,9 @@ NS_IMETHODIMP nsImapMailFolder::RemoveSubFolder (nsIMsgFolder *which)
|
|||
nsCOMPtr<nsISupports> folderSupport = do_QueryInterface(which, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
folders->AppendElement(folderSupport);
|
||||
rv = nsMsgDBFolder::DeleteSubFolders(folders, nsnull);
|
||||
which->Delete();
|
||||
return nsMsgDBFolder::DeleteSubFolders(folders, nsnull);
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsImapMailFolder::CreateStorageIfMissing(nsIUrlListener* urlListener)
|
||||
|
|
Загрузка…
Ссылка в новой задаче