urg, backing out, this breaks attaching files with non-ascii names on non-windows platforms

This commit is contained in:
cbiesinger%web.de 2003-04-19 14:16:35 +00:00
Родитель 8a87e924dd
Коммит 3abe47f3a5
1 изменённых файлов: 10 добавлений и 2 удалений

Просмотреть файл

@ -3517,8 +3517,16 @@ nsresult nsMsgCompose::AttachmentPrettyName(const char* url, PRUnichar** _retval
char * leafName = fileSpec.GetLeafName();
if (leafName && *leafName)
{
/* file URL is now in UTF-8 */
*_retval = ToNewUnicode(NS_ConvertUTF8toUCS2(leafName));
#ifdef MOZ_UNICODE
/* file URL is now in UTF-8 */
*_retval = ToNewUnicode(NS_ConvertUTF8toUCS2(leafName));
#else
nsAutoString tempStr;
nsresult rv = ConvertToUnicode(nsMsgI18NFileSystemCharset(), leafName, tempStr);
if (NS_FAILED(rv))
tempStr.AssignWithConversion(leafName);
*_retval = ToNewUnicode(tempStr);
#endif /* MOZ_UNICODE */
nsCRT::free(leafName);
return NS_OK;
}