mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-06-16 17:55:15 +00:00
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:
parent
7bd656484e
commit
d5c8cba194
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user