From 679322a8ac17c2904972fff40a9e762a325070bb Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Tue, 1 Apr 2025 12:12:58 +0200 Subject: [PATCH] Fix everything that you broke retard --- utils/modifycommand.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/utils/modifycommand.go b/utils/modifycommand.go index 267139e..3890560 100644 --- a/utils/modifycommand.go +++ b/utils/modifycommand.go @@ -75,7 +75,15 @@ func AssociateFilesWithCommands(files []string, commands []ModifyCommand) (map[s } for _, command := range commands { for _, glob := range command.Files { - matches, err := Matches(file, glob) + _, pattern, err := FigureOutGlobRoot(glob) + if err != nil { + logger.Trace("Failed to figure out glob root for %s: %v", glob, err) + continue + } + file = filepath.Clean(file) + file = strings.ReplaceAll(file, "\\", "/") + + matches, err := Matches(file, pattern) if err != nil { logger.Trace("Failed to match glob %s with file %s: %v", glob, file, err) continue