exclude empty regex exclude (#6023)

This commit is contained in:
feederbox826 2025-09-09 01:04:39 -04:00 committed by GitHub
parent e23bdfa204
commit c0ba119ebf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -60,6 +60,10 @@ func generateRegexps(patterns []string) []*regexp.Regexp {
var fileRegexps []*regexp.Regexp
for _, pattern := range patterns {
if pattern == "" || pattern == " " {
logger.Warnf("Skipping empty exclude pattern")
continue
}
if !strings.HasPrefix(pattern, "(?i)") {
pattern = "(?i)" + pattern
}