Merged V3.3-BUG-FIX to HEAD

21054: Merged V3.3 to V3.3-BUG-FIX
      21053: Improvements to solution for ALF-3832

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@21055 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2010-07-09 20:34:46 +00:00
parent f3e4183cc8
commit 6b49c6727c

View File

@@ -386,6 +386,7 @@ public class AVMRemoteStore extends BaseRemoteStore
{
final Writer out = res.getWriter();
int cropPoint = store.length() + this.rootPath.length() + 1;
// need to ensure match pattern is AVM file path encoded - but don't encode * character!
StringBuilder buf = new StringBuilder(pattern.length() + 8);
for (StringTokenizer t = new StringTokenizer(pattern, "*"); t.hasMoreTokens(); /**/)
{
@@ -395,7 +396,8 @@ public class AVMRemoteStore extends BaseRemoteStore
buf.append('*');
}
}
String encpattern = buf.toString();
// ensure the escape character is itself escaped
String encpattern = buf.toString().replace("\\", "\\\\");
boolean encoded = (encpattern.length() != pattern.length());
SortedMap<String, AVMNodeDescriptor> listing = this.avmService.getDirectoryListing(node, encpattern);
for (AVMNodeDescriptor n : listing.values())