Use the right extension for appending filters to the filepicker. Bug 273498,

r=mconnor
This commit is contained in:
bzbarsky%mit.edu 2005-03-23 21:39:35 +00:00
Родитель 03155d5f84
Коммит 2e153d18de
1 изменённых файлов: 1 добавлений и 8 удалений

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

@ -375,14 +375,7 @@ function getTargetFile(aData, aSniffer, aContentType, aIsDocument, aSkipPrompt,
fp.init(window, bundle.GetStringFromName(titleKey), fp.init(window, bundle.GetStringFromName(titleKey),
Components.interfaces.nsIFilePicker.modeSave); Components.interfaces.nsIFilePicker.modeSave);
var urlExt = null; appendFiltersForContentType(fp, aContentType, defaultExtension,
try {
var url = aSniffer.uri.QueryInterface(Components.interfaces.nsIURL);
urlExt = url.fileExtension;
}
catch (e) {
}
appendFiltersForContentType(fp, aContentType, urlExt,
aIsDocument ? MODE_COMPLETE : MODE_FILEONLY); aIsDocument ? MODE_COMPLETE : MODE_FILEONLY);
if (dir) if (dir)