зеркало из https://github.com/mozilla/pjs.git
Bug 332110: Attaching out-of-locale Unicode-named file fails: won't send. r=mscott, sr=bienvenu
This commit is contained in:
Родитель
c95843de82
Коммит
5a3aad5fd9
|
@ -2321,19 +2321,6 @@ nsMsgComposeAndSend::AddCompFieldLocalAttachments()
|
|||
m_attachments[newLoc].mTmpFile->Remove(PR_FALSE);
|
||||
m_attachments[newLoc].mTmpFile =nsnull;
|
||||
}
|
||||
if (!NS_IsNativeUTF8())
|
||||
{
|
||||
// XXX : this is really hackish.
|
||||
// File URL is now in UTF-8 (bug 278161), but nsFileSpec still uses
|
||||
// the native encoding.
|
||||
NS_UnescapeURL(url);
|
||||
NS_ASSERTION(IsUTF8(url), "unescaped url must be in UTF-8");
|
||||
nsCAutoString nativeUrl;
|
||||
NS_CopyUnicodeToNative(NS_ConvertUTF8toUTF16(url), nativeUrl);
|
||||
url.Truncate(); // NS_EscapeURL will append to |url|
|
||||
NS_EscapeURL(nativeUrl.get(), -1, esc_FilePath | esc_AlwaysCopy,
|
||||
url);
|
||||
}
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIIOService> ioService = do_GetService(NS_IOSERVICE_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
|
Загрузка…
Ссылка в новой задаче