Bug 504385 - "Save Link As..." displays broken file picker when file type is unknown on Windows CE, r=vladimir

This commit is contained in:
Paul O’Shannessy 2009-08-04 14:27:12 -07:00
parent 0e9f85efe1
commit cebdbd906e

@ -2494,6 +2494,14 @@ NS_IMETHODIMP nsExternalHelperAppService::GetFromTypeAndExtension(const nsACStri
rv = FillMIMEInfoForExtensionFromExtras(aFileExt, *_retval);
LOG(("Searched extras (by ext), rv 0x%08X\n", rv));
}
// If that still didn't work, set the file description to "ext File"
if (NS_FAILED(rv) && !aFileExt.IsEmpty()) {
// XXXzpao This should probably be localized
nsCAutoString desc(aFileExt);
desc.Append(" File");
(*_retval)->SetDescription(NS_ConvertASCIItoUTF16(desc));
LOG(("Falling back to 'File' file description\n"));
}
}
// Finally, check if we got a file extension and if yes, if it is an