From adefe59d6f1273d4b9613bf29f19bca954d6ad45 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 22 Apr 2021 14:08:47 +0100 Subject: [Minor] Lua_magic: Make an exclusion for message parts --- lualib/lua_magic/heuristics.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lualib/lua_magic') diff --git a/lualib/lua_magic/heuristics.lua b/lualib/lua_magic/heuristics.lua index 042bfde3f..5863897bc 100644 --- a/lualib/lua_magic/heuristics.lua +++ b/lualib/lua_magic/heuristics.lua @@ -427,7 +427,7 @@ exports.text_part_heuristic = function(part, log_obj, _) local ext, weight = process_top_detected(res) - if weight and weight >= 40 then + if weight and weight >= 40 and mtype ~= 'message' then return ext, weight end end -- cgit v1.2.3