Only answer questions with positive assertions.

This commit is contained in:
rjc%netscape.com 1999-03-19 00:44:04 +00:00
parent 2c90d6f07f
commit b8c6ad0745
2 changed files with 16 additions and 0 deletions

View File

@ -315,6 +315,10 @@ FileSystemDataSource::GetTargets(nsIRDFResource *source,
nsVoidArray *array = nsnull;
nsresult rv = NS_ERROR_FAILURE;
// we only have positive assertions in the file system data source.
if (! tv)
return rv;
if (peq(source, kNC_FileSystemRoot))
{
if (peq(property, kNC_Child))
@ -397,6 +401,10 @@ FileSystemDataSource::HasAssertion(nsIRDFResource *source,
PRBool retVal = PR_FALSE;
nsresult rv = NS_ERROR_FAILURE;
// we only have positive assertions in the file system data source.
if (! tv)
return rv;
*hasAssertion = PR_FALSE;
if (peq(source, kNC_FileSystemRoot) || isFileURI(source))
{

View File

@ -422,6 +422,10 @@ FindDataSource::GetTargets(nsIRDFResource *source,
nsVoidArray *array = nsnull;
nsresult rv = NS_ERROR_FAILURE;
// we only have positive assertions in the find data source.
if (! tv)
return rv;
if (isFindURI(source))
{
if (peq(property, kNC_Child))
@ -493,6 +497,10 @@ FindDataSource::HasAssertion(nsIRDFResource *source,
PRBool retVal = PR_FALSE;
nsresult rv = NS_ERROR_FAILURE;
// we only have positive assertions in the find data source.
if (! tv)
return rv;
*hasAssertion = PR_FALSE;
if (isFindURI(source))
{