From 7e1e6b947ddf30741e44bdca52150493e9bbf2fd Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 27 Dec 2018 14:46:37 +0000 Subject: [PATCH] [Minor] Mime_types: Add exclusion for numbers in extensions --- src/plugins/lua/mime_types.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/lua/mime_types.lua b/src/plugins/lua/mime_types.lua index e52933af12..e13d535b4a 100644 --- a/src/plugins/lua/mime_types.lua +++ b/src/plugins/lua/mime_types.lua @@ -1001,7 +1001,9 @@ local function check_mime_type(task) if ext2 then local enc_ext = gen_extension(fl[1].name) - if enc_ext and enc_ext ~= ext2 then + if 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)) end -- 2.47.3