Fix bug in folder search code when there are pseudo files and only one real file, the real file was not being returned in the search.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2310 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gary Spencer 2006-02-06 17:55:13 +00:00
parent 7bd656484e
commit d5c8cba194

View File

@ -146,18 +146,21 @@ public class ContentSearchContext extends SearchContext
// Copy the file information to the callers file info
info.copyFrom( pinfo);
return true;
}
}
else
// Check if we have finished with the pseudo file list, switch to the normal file list
if ( index == (pseudoList.numberOfFiles() - 1))
{
// Switch to the main file list
donePseudoFiles = true;
index = 0;
index = -1;
}
if ( results == null || results.size() == 0)
return false;
// Indicate that the file information is valid
return true;
}
}
}
@ -226,7 +229,7 @@ public class ContentSearchContext extends SearchContext
// Switch to the main file list
donePseudoFiles = true;
index = 0;
index = -1;
if ( results == null || results.size() == 0)
return null;