Bug #227711 wrong mime type shown when helper app entry present

fix this by always setting the real mime type on a mime info got from prefs.
r=bzbarsky sr=darin a=asa
This commit is contained in:
cbiesinger%web.de 2003-12-12 09:42:54 +00:00
Родитель 5de61ee1a6
Коммит d6ad711ccb
1 изменённых файлов: 3 добавлений и 1 удалений

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

@ -2212,6 +2212,8 @@ NS_IMETHODIMP nsExternalHelperAppService::GetFromTypeAndExtension(const char *aM
rv = GetMIMEInfoForExtensionFromDS(aFileExt, *_retval);
LOG(("Data source: Via ext: retval 0x%08x\n", rv));
found = NS_SUCCEEDED(rv);
if (found && aMIMEType && *aMIMEType)
(*_retval)->SetMIMEType(aMIMEType);
}
}
@ -2246,7 +2248,7 @@ NS_IMETHODIMP nsExternalHelperAppService::GetFromTypeAndExtension(const char *aM
if (aFileExt && *aFileExt) {
PRBool matches = PR_FALSE;
(*_retval)->ExtensionExists(aFileExt, &matches);
LOG(("Extension '%s' matches mime info: '%s'\n", aFileExt, matches? "yes" : "no"));
LOG(("Extension '%s' matches mime info: %s\n", aFileExt, matches ? "yes" : "no"));
if (matches)
(*_retval)->SetPrimaryExtension(aFileExt);
}