ALF-11345 Avoid double stripping of /alfresco from the WebDAV lock path

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32588 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Nick Burch
2011-12-07 05:05:41 +00:00
parent 8dce052cea
commit 8259b3c9da

View File

@@ -281,11 +281,16 @@ public class WebDAVHelper
return fileFolderService.getFileInfo(rootNodeRef);
}
// remove the servlet path from the path
if (servletPath != null && servletPath.length() > 0 && path.startsWith(servletPath))
// Remove the servlet path from the path, assuming it hasn't already been done
if (servletPath != null && servletPath.length() > 0)
{
// Strip the servlet path from the relative path
path = path.substring(servletPath.length());
// Need to ensure we don't strip /alfresco from a site of /alfresco_name/
String comparePath = servletPath + "/";
if (path.startsWith(comparePath))
{
// Strip the servlet path from the relative path
path = path.substring(servletPath.length());
}
}
// split the paths up