summaryrefslogtreecommitdiffstats
path: root/src/plugins/lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/lua')
-rw-r--r--src/plugins/lua/antivirus.lua11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/plugins/lua/antivirus.lua b/src/plugins/lua/antivirus.lua
index 05b089cf0..79250eeb5 100644
--- a/src/plugins/lua/antivirus.lua
+++ b/src/plugins/lua/antivirus.lua
@@ -196,10 +196,13 @@ local function clamav_check(task, rule)
stop_pattern = '\0'
})
end
- if check_av_cache(task, rule, clamav_check_uncached) then
- return
- else
- clamav_check_uncached()
+
+ if need_av_check(task, rule) then
+ if check_av_cache(task, rule, clamav_check_uncached) then
+ return
+ else
+ clamav_check_uncached()
+ end
end
end