From ab58c4cf42362df91c570afc2fec47917616c36b Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 23 Aug 2016 20:27:53 +0100 Subject: [PATCH] [Feature] Add condition to do antiviral check --- src/plugins/lua/antivirus.lua | 11 +++++++---- 1 file 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 -- 2.39.5