Bug #302470 --> saved search folders containing non-ascii characters aren't displayed correctly in the folder pane. sr=bienvenu

git-svn-id: svn://10.0.0.236/trunk@218098 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
scott%scott-macgregor.org
2007-01-10 04:04:40 +00:00
parent 154fd43330
commit f28c15b770

View File

@@ -222,8 +222,6 @@ nsImapMailFolder::nsImapMailFolder() :
m_appendMsgMonitor = nsnull; // since we're not using this (yet?) make it null.
// if we do start using it, it should be created lazily
nsresult rv;
m_thread = do_GetCurrentThread();
m_moveCoalescer = nsnull;
m_boxFlags = 0;
@@ -334,13 +332,15 @@ NS_IMETHODIMP nsImapMailFolder::AddSubfolder(const nsAString& aName,
nsCAutoString uri(mURI);
uri.Append('/');
// convert name to imap modified utf7, like an imap server would
nsCAutoString utfFolderName;
rv = CopyUTF16toMUTF7(PromiseFlatString(aName), utfFolderName);
// If AddSubFolder starts getting called for folders other than virtual folders,
// we'll have to do convert those names to modified utf-7. For now, the account manager code
// that loads the virtual folders for each account, expects utf8 not modified utf-7.
nsCAutoString escapedName;
rv = NS_MsgEscapeEncodeURLPath(aName, escapedName);
NS_ENSURE_SUCCESS(rv, rv);
uri += utfFolderName.get();
uri += escapedName.get();
nsCOMPtr <nsIMsgFolder> msgFolder;
rv = GetChildWithURI(uri.get(), PR_FALSE/*deep*/, PR_TRUE /*case Insensitive*/, getter_AddRefs(msgFolder));
if (NS_SUCCEEDED(rv) && msgFolder)