Bug 141330; don't force extension to match content type on Mac; r=sdagley, sr=jag

This commit is contained in:
law%netscape.com 2002-05-03 03:20:11 +00:00
Родитель 3ca14a36a3
Коммит 3207fa9e77
1 изменённых файлов: 4 добавлений и 0 удалений

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

@ -894,8 +894,10 @@ void nsExternalAppHandler::ExtractSuggestedFileNameFromChannel(nsIChannel* aChan
// The filename must be ASCII, see RFC 2183, section 2.3
mSuggestedFileName = Substring(start, iter);
#ifndef XP_MAC
// Make sure extension is still correct.
EnsureSuggestedFileName();
#endif
// replace platform specific path separator and illegal characters to avoid any confusion
mSuggestedFileName.ReplaceChar(FILE_PATH_SEPARATOR FILE_ILLEGAL_CHARACTERS, '-');
@ -1032,8 +1034,10 @@ nsresult nsExternalAppHandler::SetUpTempFile(nsIChannel * aChannel)
NS_UnescapeURL(leafName);
mSuggestedFileName = leafName;
#ifndef XP_MAC
// Make sure extension is still correct.
EnsureSuggestedFileName();
#endif
// replace platform specific path separator and illegal characters to avoid any confusion
mSuggestedFileName.ReplaceChar(FILE_PATH_SEPARATOR FILE_ILLEGAL_CHARACTERS, '-');