fix for bug#71907 -cant send message;r=ducarroz;sr=bienvenu

This commit is contained in:
varada%netscape.com 2001-04-03 19:27:11 +00:00
Родитель 7d1437f546
Коммит 4e0facd69e
1 изменённых файлов: 11 добавлений и 2 удалений

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

@ -104,14 +104,23 @@ static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
nsFileSpec *
nsMsgCreateTempFileSpec(char *tFileName)
{
//Calling nsEscape so that when Replies are forwarded - the ':' in the subject line doesnt cause problems
// while creating files on windows. Using url_XPAlphas in order to escape even spaces.
char *escapedName=nsnull;
if ((!tFileName) || (!*tFileName))
tFileName = "nsmime.tmp";
nsFileSpec *tmpSpec = new nsFileSpec(nsSpecialSystemDirectory(nsSpecialSystemDirectory::OS_TemporaryDirectory));
if (!tmpSpec)
return nsnull;
*tmpSpec += tFileName;
escapedName = nsEscape(tFileName, url_Path);
if (!escapedName)
escapedName = nsCRT::strdup(tFileName); //if we dont get back an escaped value - then copy the filename
*tmpSpec += escapedName;
nsCRT::free(escapedName);
tmpSpec->MakeUnique();
return tmpSpec;