mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
MERGED DEV TO HEAD
ALF-10821 : WebDAV malformed URL git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31364 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -363,17 +363,25 @@ public final class Utils extends StringUtils
|
|||||||
context).getFileFolderService();
|
context).getFileFolderService();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
List<FileInfo> paths = fileFolderService.getNamePath(null, node.getNodeRef());
|
NodeRef rootNode = WebDAVServlet.getWebdavRootNode();
|
||||||
|
if (rootNode != null)
|
||||||
// build up the webdav url
|
|
||||||
StringBuilder path = new StringBuilder("/").append(WebDAVServlet.WEBDAV_PREFIX);
|
|
||||||
|
|
||||||
// build up the path skipping the first path as it is the root folder
|
|
||||||
for (int x = 1; x < paths.size(); x++)
|
|
||||||
{
|
{
|
||||||
path.append("/").append(WebDAVHelper.encodeURL(paths.get(x).getName(), getUserAgent(context)));
|
// build up the webdav url
|
||||||
|
StringBuilder path = new StringBuilder("/").append(WebDAVServlet.WEBDAV_PREFIX);
|
||||||
|
|
||||||
|
if (!rootNode.equals(node.getNodeRef()))
|
||||||
|
{
|
||||||
|
|
||||||
|
List<FileInfo> paths = fileFolderService.getNamePath(rootNode, node.getNodeRef());
|
||||||
|
|
||||||
|
// build up the path skipping the first path as it is the root folder
|
||||||
|
for (int x = 0; x < paths.size(); x++)
|
||||||
|
{
|
||||||
|
path.append("/").append(WebDAVHelper.encodeURL(paths.get(x).getName(), getUserAgent(context)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
url = path.toString();
|
||||||
}
|
}
|
||||||
url = path.toString();
|
|
||||||
}
|
}
|
||||||
catch (AccessDeniedException e)
|
catch (AccessDeniedException e)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user