mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged DEV_TEMPORARY to HEAD
18288: ENH-678: alfresco webdav does not pass litmus webdav test suite git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@18320 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -95,6 +95,10 @@ public abstract class AbstractMoveOrCopyMethod extends HierarchicalMethod
|
||||
FileInfo destParentInfo = null;
|
||||
try
|
||||
{
|
||||
if (destPath.endsWith(WebDAVHelper.PathSeperator))
|
||||
{
|
||||
destPath = destPath.substring(0, destPath.length() - 1);
|
||||
}
|
||||
destParentInfo = getDAVHelper().getParentNodeForPath(rootNodeRef, destPath, servletPath);
|
||||
}
|
||||
catch (FileNotFoundException e)
|
||||
@@ -103,7 +107,7 @@ public abstract class AbstractMoveOrCopyMethod extends HierarchicalMethod
|
||||
{
|
||||
logger.debug("Destination parent folder doesn't exist: " + destPath);
|
||||
}
|
||||
throw new WebDAVServerException(HttpServletResponse.SC_NOT_FOUND);
|
||||
throw new WebDAVServerException(HttpServletResponse.SC_CONFLICT);
|
||||
}
|
||||
|
||||
// check for the existence of the destination node
|
||||
@@ -123,6 +127,8 @@ public abstract class AbstractMoveOrCopyMethod extends HierarchicalMethod
|
||||
// delete the destination node if it is not the same as the source node
|
||||
if (!destInfo.getNodeRef().equals(sourceInfo.getNodeRef()))
|
||||
{
|
||||
checkNode(destInfo);
|
||||
|
||||
// attempting to move or copy onto another node
|
||||
fileFolderService.delete(destInfo.getNodeRef());
|
||||
}
|
||||
@@ -138,7 +144,9 @@ public abstract class AbstractMoveOrCopyMethod extends HierarchicalMethod
|
||||
|
||||
NodeRef sourceNodeRef = sourceInfo.getNodeRef();
|
||||
NodeRef destParentNodeRef = destParentInfo.getNodeRef();
|
||||
|
||||
String name = getDAVHelper().splitPath(destPath)[1];
|
||||
|
||||
moveOrCopy(fileFolderService, sourceNodeRef, destParentNodeRef, name);
|
||||
|
||||
// Set the response status
|
||||
|
Reference in New Issue
Block a user