feat 目录监控黑名单支持正则
This commit is contained in:
parent
9b8dc76fb0
commit
5718b33fd8
@ -1,3 +1,4 @@
|
|||||||
|
import re
|
||||||
import threading
|
import threading
|
||||||
import traceback
|
import traceback
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
@ -157,7 +158,7 @@ class DirMonitor(_PluginBase):
|
|||||||
# 命中过滤关键字不处理
|
# 命中过滤关键字不处理
|
||||||
if self._exclude_keywords:
|
if self._exclude_keywords:
|
||||||
for keyword in self._exclude_keywords.split("\n"):
|
for keyword in self._exclude_keywords.split("\n"):
|
||||||
if keyword and keyword in event_path:
|
if keyword and re.findall(keyword, event_path):
|
||||||
logger.debug(f"{event_path} 命中过滤关键字 {keyword}")
|
logger.debug(f"{event_path} 命中过滤关键字 {keyword}")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user