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 git-svn-id: svn://10.0.0.236/trunk@150239 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
7b35fb3660
commit
6e629bd8da
@ -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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user