fix: preserve CHFS absolute section rule semantics
This commit is contained in:
@@ -110,7 +110,10 @@ func accountRulePath(rule string, roots []string) string {
|
|||||||
}
|
}
|
||||||
rule = filepath.ToSlash(rule)
|
rule = filepath.ToSlash(rule)
|
||||||
if !filepath.IsAbs(rule) {
|
if !filepath.IsAbs(rule) {
|
||||||
return strings.Trim(rule, "/")
|
// CHFS section rules are filesystem paths. Do not silently rebase a
|
||||||
|
// relative rule onto --path; the original parser treats such a value
|
||||||
|
// as a literal path and it therefore does not match a virtual path.
|
||||||
|
return rule
|
||||||
}
|
}
|
||||||
for _, root := range roots {
|
for _, root := range roots {
|
||||||
r := filepath.Clean(root)
|
r := filepath.Clean(root)
|
||||||
|
|||||||
Reference in New Issue
Block a user