From 6bfb1182eb065aa72afbf364e80277896943452f Mon Sep 17 00:00:00 2001 From: Alexander Moisseev Date: Fri, 8 Mar 2019 15:06:13 +0300 Subject: [PATCH] [Minor] mime_types: Skip extensions matching if extension of the file inside archive is not bad --- src/plugins/lua/mime_types.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/lua/mime_types.lua b/src/plugins/lua/mime_types.lua index 98acd463f1..589f82515d 100644 --- a/src/plugins/lua/mime_types.lua +++ b/src/plugins/lua/mime_types.lua @@ -1016,8 +1016,9 @@ local function check_mime_type(task) if ext2 then local enc_ext = gen_extension(fl[1].name) - if enc_ext and - not string.match(ext2, '^%d+$') + if enc_ext + and settings['bad_extensions'][enc_ext] + and not string.match(ext2, '^%d+$') and enc_ext ~= ext2 then task:insert_result(settings['symbol_double_extension'], 2.0, string.format("%s!=%s", ext2, enc_ext)) -- 2.47.3