fix #536
This commit is contained in:
@ -175,12 +175,17 @@ class TransferChain(ChainBase):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
# 整理屏蔽词不处理
|
# 整理屏蔽词不处理
|
||||||
|
is_blocked = False
|
||||||
if transfer_exclude_words:
|
if transfer_exclude_words:
|
||||||
for keyword in transfer_exclude_words:
|
for keyword in transfer_exclude_words:
|
||||||
if not keyword:
|
if not keyword:
|
||||||
continue
|
continue
|
||||||
if keyword and re.findall(keyword, file_path_str):
|
if keyword and re.search(r"%s" % keyword, file_path_str, re.IGNORECASE):
|
||||||
logger.info(f"{file_path} 命中整理屏蔽词 {keyword},不处理")
|
logger.info(f"{file_path} 命中整理屏蔽词 {keyword},不处理")
|
||||||
|
is_blocked = True
|
||||||
|
break
|
||||||
|
if is_blocked:
|
||||||
|
err_msgs.append(f"{file_path.name} 命中整理屏蔽词")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# 转移成功的不再处理
|
# 转移成功的不再处理
|
||||||
|
@ -223,7 +223,7 @@ class DirMonitor(_PluginBase):
|
|||||||
for keyword in transfer_exclude_words:
|
for keyword in transfer_exclude_words:
|
||||||
if not keyword:
|
if not keyword:
|
||||||
continue
|
continue
|
||||||
if keyword and re.findall(keyword, event_path):
|
if keyword and re.search(r"%s" % keyword, event_path, re.IGNORECASE):
|
||||||
logger.info(f"{event_path} 命中整理屏蔽词 {keyword},不处理")
|
logger.info(f"{event_path} 命中整理屏蔽词 {keyword},不处理")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user