mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-07 11:56:51 +00:00
fix 368064 creating .msf files for special folders (sent, templates, drafts) when we don't need to, which for non-english localizations might cause two Sent folders to get created, one in English, one in the localization language, sr=mscott
This commit is contained in:
parent
4bd8ed6bb7
commit
85b5aa0f5f
@ -432,10 +432,6 @@ nsMsgLocalMailFolder::GetSubFolders(nsIEnumerator* *result)
|
||||
rv = CreateSubFolders(path);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
// must happen after CreateSubFolders, or the folders won't exist.
|
||||
// don't call this more than necessary, it's expensive
|
||||
SetPrefFlag();
|
||||
|
||||
// must happen after CreateSubFolders, or the folders won't exist.
|
||||
if (createdDefaultMailboxes && isServer)
|
||||
{
|
||||
@ -3535,7 +3531,15 @@ nsMsgLocalMailFolder::setSubfolderFlag(const PRUnichar *aFolderName,
|
||||
return rv;
|
||||
if (!msgFolder)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
|
||||
// we only want to do this if the folder *really* exists,
|
||||
// so check if it has a parent. Otherwise, we'll create the
|
||||
// .msf file when we don't want to.
|
||||
nsCOMPtr <nsIMsgFolder> parent;
|
||||
msgFolder->GetParent(getter_AddRefs(parent));
|
||||
if (!parent)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
rv = msgFolder->SetFlag(flags);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
Loading…
Reference in New Issue
Block a user