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:
cbiesinger%web.de 2003-11-17 21:31:11 +00:00
Родитель 82ecc498bc
Коммит e11426dbe2
1 изменённых файлов: 3 добавлений и 0 удалений

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

@ -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);