mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 13:55:43 +00:00
Bug #270261 --> port thunderbird 1.0 fix back to the trunk...
Junk folder created incorrectly when junkFolderName is localized sr=bienvenu
This commit is contained in:
parent
9ba9ab9d39
commit
14dd7eca86
@ -696,6 +696,7 @@ nsresult IsRFC822HeaderFieldName(const char *aHdr, PRBool *aResult)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Warning, currently this routine only works for the Junk Folder
|
||||
nsresult
|
||||
GetOrCreateFolder(const nsACString &aURI, nsIUrlListener *aListener)
|
||||
{
|
||||
@ -747,9 +748,20 @@ GetOrCreateFolder(const nsACString &aURI, nsIUrlListener *aListener)
|
||||
folderPath->Exists(&exists);
|
||||
if (!exists)
|
||||
{
|
||||
// Hack to work around a localization bug with the Junk Folder.
|
||||
// Please see Bug #270261 for more information...
|
||||
nsXPIDLString localizedJunkName;
|
||||
msgFolder->GetName(getter_Copies(localizedJunkName));
|
||||
|
||||
// force the junk folder name to be Junk so it gets created on disk correctly...
|
||||
msgFolder->SetName(NS_LITERAL_STRING("Junk").get());
|
||||
|
||||
rv = msgFolder->CreateStorageIfMissing(aListener);
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
|
||||
// now restore the localized folder name...
|
||||
msgFolder->SetName(localizedJunkName.get());
|
||||
|
||||
// XXX TODO
|
||||
// JUNK MAIL RELATED
|
||||
// ugh, I hate this hack
|
||||
|
Loading…
Reference in New Issue
Block a user