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

r=mconnor
This commit is contained in:
bzbarsky%mit.edu 2004-12-09 15:39:11 +00:00
parent 1ff4a395f8
commit a84fe5ad7b

View File

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