Added an error check for charset conversion result for mail folder creation,
patch by mkaply@us.ibm.com, bug 156336, r=naving, sr=bienvenu. git-svn-id: svn://10.0.0.236/trunk@129719 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -64,6 +64,7 @@ downloadingMail=Downloading Mail for Offline Use
|
||||
sendingUnsent=Sending Unsent Messages
|
||||
|
||||
folderExists=A folder with that name already exists. Please enter a different name.
|
||||
folderCreationFailed=The folder could not be created because the folder name you specified contains an unrecognized character. Please enter a different name and try again.
|
||||
compactingFolder=Compacting folder %S...
|
||||
autoCompactAllFolders=Do you wish to compact all local and offline folders to save disk space?
|
||||
confirmFolderDeletionForFilter=Deleting the folder '%S' will disable its associated filter(s). Are you sure you want to delete the folder?
|
||||
|
||||
@@ -818,8 +818,13 @@ nsMsgLocalMailFolder::CreateSubfolder(const PRUnichar *folderName, nsIMsgWindow
|
||||
return rv;
|
||||
|
||||
nsXPIDLCString nativeFolderName;
|
||||
ConvertFromUnicode(nsMsgI18NFileSystemCharset(), nsAutoString(folderName),
|
||||
rv = ConvertFromUnicode(nsMsgI18NFileSystemCharset(), nsAutoString(folderName),
|
||||
getter_Copies(nativeFolderName));
|
||||
if (NS_FAILED(rv) || (nativeFolderName.Length() == 0)) {
|
||||
ThrowAlertMsg("folderCreationFailed", msgWindow);
|
||||
// I'm returning this value so the dialog stays up
|
||||
return NS_MSG_FOLDER_EXISTS;
|
||||
}
|
||||
|
||||
nsCAutoString safeFolderName;
|
||||
safeFolderName.Assign(nativeFolderName.get());
|
||||
|
||||
Reference in New Issue
Block a user