ensure the pattern matches too
This commit is contained in:
parent
044cbbe698
commit
9dac3ef988
1 changed files with 2 additions and 1 deletions
|
|
@ -8,7 +8,8 @@ import (
|
||||||
|
|
||||||
func matchesAny(patterns []string, path string) bool {
|
func matchesAny(patterns []string, path string) bool {
|
||||||
for _, pattern := range patterns {
|
for _, pattern := range patterns {
|
||||||
matched, err := doublestar.Match(pattern, strings.ReplaceAll(path, `\`, "/"))
|
matched, err :=
|
||||||
|
doublestar.Match(strings.ReplaceAll(pattern, `\`, "/"), strings.ReplaceAll(path, `\`, "/"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("Error matching pattern: %v\n", err)
|
fmt.Printf("Error matching pattern: %v\n", err)
|
||||||
return false
|
return false
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue