mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 00:13:46 +01:00
exclude empty regex exclude (#6023)
This commit is contained in:
parent
e23bdfa204
commit
c0ba119ebf
1 changed files with 4 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue