compile regex only once in filte inside regex condition
This commit is contained in:
@@ -111,8 +111,8 @@ func (z *ZurgConfigV1) matchFilter(fileID, torrentName string, fileNames []strin
|
||||
}
|
||||
}
|
||||
if filter.FileInsideRegexStr != "" {
|
||||
regex := compilePattern(filter.FileInsideRegexStr)
|
||||
for _, filename := range fileNames {
|
||||
regex := compilePattern(filter.FileInsideRegexStr)
|
||||
if regex.MatchString(filename) {
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user