Skip to content

Commit

Permalink
xrootd: fix xrootd.root regression
Browse files Browse the repository at this point in the history
Motivation:

Commit c491f2d has
introduced handling of relative paths in xrootd with
inadvertent side effect of dropping support xroot.root
variable.

Modification:

Check xroot.root and user root and choose the one that is longest

Result:

The pre-9.2 behavior is restored

Ticket: https://rt.dcache.org/Ticket/Display.html?id=10545

Target: master
Request: 9.0, 9.1, 9.2
Require-notes: yes
Acked-by: Albert Rossi
Patch: https://rb.dcache.org/r/14184/
  • Loading branch information
DmitryLitvintsev authored and lemora committed Dec 19, 2023
1 parent baa135b commit 3840f87
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -1403,7 +1403,10 @@ private FsPath effectiveRoot() {
return _rootPath;
}
FsPath userRoot = loginSessionInfo != null ? loginSessionInfo.getUserRootPath() : null;
return userRoot != null ? userRoot : _rootPath;
if (userRoot == null) {
return _rootPath;
}
return userRoot.contains(_rootPath.toString()) ? userRoot : _rootPath;
}

/**
Expand Down

0 comments on commit 3840f87

Please sign in to comment.