filter: Allow double wildcard in ChildMatch

This commit is contained in:
Alexander Neumann
2018-06-09 23:12:51 +02:00
parent ce01ca30d6
commit 14aead94b3
2 changed files with 48 additions and 14 deletions

View File

@@ -83,6 +83,12 @@ func childMatch(patterns, strs []string) (matched bool, err error) {
return true, nil
}
ok, pos := hasDoubleWildcard(patterns)
if ok && len(strs) >= pos {
// cut off at the double wildcard
strs = strs[:pos]
}
// match path against absolute pattern prefix
l := 0
if len(strs) > len(patterns) {