зеркало из https://github.com/mozilla/pjs.git
225972 GetMIMEInfoForExtensionFromDS returns success even if nothing was found
also fixes: GetMIMEInfoForExtensionFromExtras does not set a mime type on the mime info r+sr=bzbarsky; this addresses the problem that the information in extras is never used
This commit is contained in:
Родитель
82ecc498bc
Коммит
e11426dbe2
|
@ -888,6 +888,8 @@ nsresult nsExternalHelperAppService::GetMIMEInfoForExtensionFromDS(const char *
|
|||
rv = FillContentHandlerProperties(contentTypeStr.get(), contentTypeNodeResource, rdf, aMIMEInfo);
|
||||
}
|
||||
} // if we have a node in the graph for this extension
|
||||
else if (!contentTypeNodeResource)
|
||||
rv = NS_ERROR_NOT_AVAILABLE;
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
@ -2442,6 +2444,7 @@ nsresult nsExternalHelperAppService::GetMIMEInfoForExtensionFromExtras(const cha
|
|||
nsCaseInsensitiveCStringComparator()))
|
||||
{
|
||||
// Set attributes appropriately.
|
||||
aMIMEInfo->SetMIMEType(extraMimeEntries[index].mMimeType);
|
||||
aMIMEInfo->SetFileExtensions(extraMimeEntries[index].mFileExtensions);
|
||||
aMIMEInfo->SetDescription(NS_ConvertASCIItoUCS2(extraMimeEntries[index].mDescription).get());
|
||||
aMIMEInfo->SetMacType(extraMimeEntries[index].mMactype);
|
||||
|
|
Загрузка…
Ссылка в новой задаче