зеркало из https://github.com/mozilla/gecko-dev.git
urg, backing out, this breaks attaching files with non-ascii names on non-windows platforms
This commit is contained in:
Родитель
f8d7c8b06d
Коммит
79e2ea0435
|
@ -3517,8 +3517,16 @@ nsresult nsMsgCompose::AttachmentPrettyName(const char* url, PRUnichar** _retval
|
||||||
char * leafName = fileSpec.GetLeafName();
|
char * leafName = fileSpec.GetLeafName();
|
||||||
if (leafName && *leafName)
|
if (leafName && *leafName)
|
||||||
{
|
{
|
||||||
|
#ifdef MOZ_UNICODE
|
||||||
/* file URL is now in UTF-8 */
|
/* file URL is now in UTF-8 */
|
||||||
*_retval = ToNewUnicode(NS_ConvertUTF8toUCS2(leafName));
|
*_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);
|
nsCRT::free(leafName);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче