Fix glob matching when backslashes are used as separators

This commit is contained in:
2025-07-30 14:41:38 +02:00
parent 388822e90a
commit 299e6d8bfe
2 changed files with 12 additions and 0 deletions

View File

@@ -94,6 +94,7 @@ func AssociateFilesWithCommands(files []string, commands []ModifyCommand) (map[s
}
for _, command := range commands {
for _, glob := range command.Files {
glob = strings.ReplaceAll(glob, "\\", "/")
static, pattern := SplitPattern(glob)
patternFile := strings.Replace(file, static+`/`, "", 1)
matches, err := Matches(patternFile, pattern)