mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
exclude empty regex exclude (#6023)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user