reschke commented on code in PR #1596:
URL: https://github.com/apache/jackrabbit-oak/pull/1596#discussion_r1687596073


##########
oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/PathUtils.java:
##########
@@ -367,11 +367,13 @@ public static boolean isAncestor(String ancestor, String 
path) {
         if (denotesRoot(ancestor)) {
             if (denotesRoot(path)) {
                 return false;
+            } else {
+                return path.startsWith(ancestor);

Review Comment:
   Unless there's test coverage for relative paths, I'd assume that the 
function is not supposed to be used with relative paths. We should document 
that, and reject relative paths.
   
   I'm also not that happy with the use of "assert", but that's a separate 
issue.
   
   Maybe we need to open a ticket to cover the relative path case.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to