From f28c15b770d08d7e13a08ce4f02ac400ce7862fb Mon Sep 17 00:00:00 2001 From: "scott%scott-macgregor.org" Date: Wed, 10 Jan 2007 04:04:40 +0000 Subject: [PATCH] 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 --- mozilla/mailnews/imap/src/nsImapMailFolder.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mozilla/mailnews/imap/src/nsImapMailFolder.cpp b/mozilla/mailnews/imap/src/nsImapMailFolder.cpp index 3254e8bc88e..e8a591c6adf 100644 --- a/mozilla/mailnews/imap/src/nsImapMailFolder.cpp +++ b/mozilla/mailnews/imap/src/nsImapMailFolder.cpp @@ -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 msgFolder; rv = GetChildWithURI(uri.get(), PR_FALSE/*deep*/, PR_TRUE /*case Insensitive*/, getter_AddRefs(msgFolder)); if (NS_SUCCEEDED(rv) && msgFolder)