lib/ignore: Correct case insensitive matching on Mac/Windows
There was a bug in that we only did the lowercase folding when the pattern had an explicit (?i), which is not the case on Windows/Mac necessarily.
This commit is contained in:
@@ -229,8 +229,12 @@ func parseIgnoreFile(fd io.Reader, currentFile string, seen map[string]bool) ([]
|
||||
}
|
||||
|
||||
if strings.HasPrefix(line, "(?i)") {
|
||||
line = strings.ToLower(line[4:])
|
||||
pattern.foldCase = true
|
||||
line = line[4:]
|
||||
}
|
||||
|
||||
if pattern.foldCase {
|
||||
line = strings.ToLower(line)
|
||||
}
|
||||
|
||||
var err error
|
||||
|
||||
Reference in New Issue
Block a user