mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Fixed problem where URL pseudo files would occasionally not be added to the folder listing.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2341 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -653,30 +653,41 @@ public class ContentDiskDriver implements DiskInterface, IOCtlInterface
|
||||
paths = FileName.splitPath(searchPath);
|
||||
if ( paths[0] != null && paths[0].length() > 1)
|
||||
{
|
||||
// Find the node ref for the folder being searched
|
||||
|
||||
NodeRef nodeRef = getNodeForPath(tree, paths[0]);
|
||||
|
||||
// Get the file state for the folder being searched
|
||||
|
||||
searchFolderState = getStateForPath(tree, paths[0]);
|
||||
if ( searchFolderState == null)
|
||||
{
|
||||
// Create a file state for the folder
|
||||
|
||||
searchFolderState = ctx.getStateTable().findFileState( paths[0], true, true);
|
||||
}
|
||||
|
||||
// Make sure the associated node is set
|
||||
|
||||
if ( searchFolderState.hasNodeRef() == false)
|
||||
{
|
||||
// Set the associated node for the folder
|
||||
|
||||
searchFolderState.setNodeRef( nodeRef);
|
||||
}
|
||||
|
||||
// Add pseudo files to the folder being searched
|
||||
|
||||
if ( hasPseudoFileInterface())
|
||||
getPseudoFileInterface().addPseudoFilesToFolder( sess, tree, paths[0]);
|
||||
|
||||
// Find the node ref for the folder being searched
|
||||
|
||||
NodeRef nodeRef = getNodeForPath(tree, paths[0]);
|
||||
// Set the search node and file spec
|
||||
|
||||
if ( nodeRef != null)
|
||||
{
|
||||
searchRootNodeRef = nodeRef;
|
||||
searchFileSpec = paths[1];
|
||||
|
||||
// Make sure the node ref is stored in the file state
|
||||
|
||||
searchFolderState.setNodeRef( nodeRef);
|
||||
|
||||
// DEBUG
|
||||
|
||||
if ( logger.isDebugEnabled())
|
||||
|
@@ -161,7 +161,11 @@ public class ContentPseudoFileImpl implements PseudoFileInterface
|
||||
|
||||
// Add the URL link pseudo file, if enabled
|
||||
|
||||
if ( isCIFS && ctx.hasURLFile() && fstate.getNodeRef() != null)
|
||||
if ( isCIFS && ctx.hasURLFile())
|
||||
{
|
||||
// Make sure the state has the associated node details
|
||||
|
||||
if ( fstate.getNodeRef() != null)
|
||||
{
|
||||
// Build the URL file data
|
||||
|
||||
@@ -190,6 +194,7 @@ public class ContentPseudoFileImpl implements PseudoFileInterface
|
||||
if ( logger.isInfoEnabled())
|
||||
logger.info("Added URL link pseudo file for " + path);
|
||||
}
|
||||
}
|
||||
|
||||
// Return the count of pseudo files added
|
||||
|
||||
|
Reference in New Issue
Block a user