mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-24 21:58:06 +00:00
Bug #262018 --> Unable to create local folders that contain semicolons or # characters. Messages in these local
folders never load. Make our folder hash routine smart enough to hash folder names that contain these characters. sr=bienvenu Porting Thunderbird 1.0 bug to the trunk
This commit is contained in:
parent
3ed5153e77
commit
9beb72aa15
@ -72,6 +72,8 @@ static NS_DEFINE_CID(kImapUrlCID, NS_IMAPURL_CID);
|
||||
static NS_DEFINE_CID(kCMailboxUrl, NS_MAILBOXURL_CID);
|
||||
static NS_DEFINE_CID(kCNntpUrlCID, NS_NNTPURL_CID);
|
||||
|
||||
#define ILLEGAL_FOLDER_CHARS ";#"
|
||||
|
||||
#define NS_PASSWORDMANAGER_CATEGORY "passwordmanager"
|
||||
static PRBool gInitPasswordManager = PR_FALSE;
|
||||
|
||||
@ -263,7 +265,7 @@ inline PRUint32 StringHash(const nsAutoString& str)
|
||||
nsresult NS_MsgHashIfNecessary(nsCAutoString &name)
|
||||
{
|
||||
NS_NAMED_LITERAL_CSTRING (illegalChars,
|
||||
FILE_PATH_SEPARATOR FILE_ILLEGAL_CHARACTERS);
|
||||
FILE_PATH_SEPARATOR FILE_ILLEGAL_CHARACTERS ILLEGAL_FOLDER_CHARS);
|
||||
nsCAutoString str(name);
|
||||
|
||||
// Given a filename, make it safe for filesystem
|
||||
@ -307,7 +309,7 @@ nsresult NS_MsgHashIfNecessary(nsCAutoString &name)
|
||||
nsresult NS_MsgHashIfNecessary(nsAutoString &name)
|
||||
{
|
||||
PRInt32 illegalCharacterIndex = name.FindCharInSet(
|
||||
FILE_PATH_SEPARATOR FILE_ILLEGAL_CHARACTERS);
|
||||
FILE_PATH_SEPARATOR FILE_ILLEGAL_CHARACTERS ILLEGAL_FOLDER_CHARS);
|
||||
|
||||
char hashedname[9];
|
||||
if (illegalCharacterIndex == kNotFound)
|
||||
|
Loading…
x
Reference in New Issue
Block a user