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:
nhotta%netscape.com
2002-09-16 17:23:59 +00:00
parent 6c54cfba7d
commit 11a6b3f265
2 changed files with 7 additions and 1 deletions

View File

@@ -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?

View File

@@ -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());