Hi Nick,

This is not a know issue. I've created a jira issue for it and will try to fix it based on your suggestion as soon as I have some time on my hands.

Regards,
Bart


On 10-11-2008 15:24, Nick Stolwijk wrote:
I found a bug on the Move command on the WebdavService in combination
with DocumentPath.

DocumentPath changes the path to a collection in the repository to one
without the last '/'. So "content/appdata/" will be "content/appdata"
when used with the move command. This will generate an error on the
repository side.

We have made a workaround with the following code:

     public synchronized void move(final String old, final String
newPath) throws RepositoryException {

         DocumentPath oldPath =
webdavService.getBasePath().createRelativePath(old);
         DocumentPath nieuwPath =
webdavService.getBasePath().createRelativePath(hippoRepoPath +
newPath);

         oldPath =
webdavService.getBasePath().createAbsolutePath(oldPath.getFullPath() +
"//");

         try {
             webdavService.executeMove(oldPath, newPath, true);
         } catch (ClientException ce) {
             log.debug("Problem with repository: " + ce.getMessage());
             throw new RepositoryException(ErrorCode.HIPPO_REPOSITORY,
"Could not move category", ce);
         }

     }


--
Hippo B.V.  -  Amsterdam
Oosteinde 11, 1017 WT, Amsterdam, +31(0)20-5224466

Hippo USA Inc.  -  San Francisco
101 H Street, Suite Q, Petaluma CA, 94952-3329, +1 (707) 773-4646
-----------------------------------------------------------------
http://www.onehippo.com   -  [EMAIL PROTECTED]
-----------------------------------------------------------------
********************************************
Hippocms-dev: Hippo CMS development public mailinglist

Searchable archives can be found at:
MarkMail: http://hippocms-dev.markmail.org
Nabble: http://www.nabble.com/Hippo-CMS-f26633.html

Reply via email to