mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fix for wildcard search handling returning dot and dot-dot file entries, repo filesystem. ALF-4960.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@26868 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -193,7 +193,7 @@ public class CacheLookupSearchContext extends ContentSearchContext {
|
|||||||
protected void setDotDotInfo(FileInfo finfo) {
|
protected void setDotDotInfo(FileInfo finfo) {
|
||||||
m_dotDotInfo = finfo;
|
m_dotDotInfo = finfo;
|
||||||
if ( m_dotDotInfo != null)
|
if ( m_dotDotInfo != null)
|
||||||
m_dotDotInfo.setFileName( ".");
|
m_dotDotInfo.setFileName( "..");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1161,7 +1161,7 @@ public class ContentDiskDriver extends AlfrescoDiskDriver implements DiskInterfa
|
|||||||
WildCard wildCard = new WildCard( searchFileSpec, false);
|
WildCard wildCard = new WildCard( searchFileSpec, false);
|
||||||
PseudoFileList filterList = null;
|
PseudoFileList filterList = null;
|
||||||
|
|
||||||
for ( int i = 0; i > pseudoList.numberOfFiles(); i++)
|
for ( int i = 0; i < pseudoList.numberOfFiles(); i++)
|
||||||
{
|
{
|
||||||
PseudoFile pseudoFile = pseudoList.getFileAt( i);
|
PseudoFile pseudoFile = pseudoList.getFileAt( i);
|
||||||
if ( wildCard.matchesPattern( pseudoFile.getFileName()))
|
if ( wildCard.matchesPattern( pseudoFile.getFileName()))
|
||||||
@@ -1244,7 +1244,9 @@ public class ContentDiskDriver extends AlfrescoDiskDriver implements DiskInterfa
|
|||||||
|
|
||||||
// Searching the root folder, re-use the search folder file information for the '..' pseudo entry
|
// Searching the root folder, re-use the search folder file information for the '..' pseudo entry
|
||||||
|
|
||||||
cacheContext.setDotDotInfo( finfo);
|
FileInfo dotDotInfo = new FileInfo();
|
||||||
|
dotDotInfo.copyFrom( finfo);
|
||||||
|
cacheContext.setDotDotInfo( dotDotInfo);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user