diff --git a/mozilla/mailnews/imap/src/nsImapIncomingServer.cpp b/mozilla/mailnews/imap/src/nsImapIncomingServer.cpp index c9be11fe003..7f4a7b767bb 100644 --- a/mozilla/mailnews/imap/src/nsImapIncomingServer.cpp +++ b/mozilla/mailnews/imap/src/nsImapIncomingServer.cpp @@ -3762,8 +3762,10 @@ nsImapIncomingServer::GetUriWithNamespacePrefixIfNecessary(PRInt32 namespaceType // it may be the case that this is the INBOX uri, in which case // we don't want to prepend the namespace. In that case, the uri ends with "INBOX", // but the namespace is "INBOX/", so they don't match. + nsCAutoString leafName; + resultUri.Right(leafName, resultUri.Length() - index - 1); if (resultUri.Find(namespacePrefix.get(), PR_FALSE, index+1) != index+1 - && !Substring(resultUri, index + 1, resultUri.Length() - index - 1).LowerCaseEqualsLiteral("inbox")) + && !leafName.EqualsIgnoreCase("inbox")) resultUri.Insert(namespacePrefix, index+1); // insert namespace prefix *convertedUri = nsCRT::strdup(resultUri.get()); }