Skip to content

Commit

Permalink
dcache-frontend: resolve on parent of source when renaming
Browse files Browse the repository at this point in the history
Motivation:

Use of relative path when issuing `mv` through
the RESTful `/api/v1/namespace` is broken.

Modifcation:

Call resolve with the parent of the path.

Result:

Fixes problem.

Target: master
Request: 8.2
Request: 8.1
Request: 8.0
Request: 7.2
Requires-notes: yes
Closes: #6932
Patch: https://rb.dcache.org/r/13905/
Acked-by: Lea
  • Loading branch information
alrossi committed Mar 3, 2023
1 parent 3590c3e commit 9c28ee5
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -439,7 +439,7 @@ public Response cmrResources(
break;
case "mv":
String dest = (String) reqPayload.get("destination");
FsPath target = pathMapper.resolve(request, path, dest);
FsPath target = pathMapper.resolve(request, path.parent(), dest);
pnfsHandler.renameEntry(path.toString(), target.toString(), true);
break;
case "qos":
Expand Down

0 comments on commit 9c28ee5

Please sign in to comment.