ensure the pattern matches too

This commit is contained in:
maddalax 2024-10-28 12:52:21 -05:00
parent 044cbbe698
commit 9dac3ef988

View file

@ -8,7 +8,8 @@ import (
func matchesAny(patterns []string, path string) bool {
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 {
fmt.Printf("Error matching pattern: %v\n", err)
return false