From a089a38e5ca71881797683ccf0f8c00237e95573 Mon Sep 17 00:00:00 2001 From: Alexander Moisseev Date: Fri, 25 Jan 2019 10:14:52 +0300 Subject: [PATCH] [Minor] mime_types: Do not treat numbers in brackets as double extension Example: PDF417(3.2.4).msi --- src/plugins/lua/mime_types.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/lua/mime_types.lua b/src/plugins/lua/mime_types.lua index a7a859e533..6b7ddbdc9f 100644 --- a/src/plugins/lua/mime_types.lua +++ b/src/plugins/lua/mime_types.lua @@ -854,7 +854,7 @@ local function check_mime_type(task) if #parts > 2 then -- We need to ensure that next-to-last extension is an extension, -- so we check for its length and if it is not a number or date - if #ext2 <= 4 and not string.match(ext2, '^%d+$') then + if #ext2 <= 4 and not string.match(ext2, '^%d+[%]%)]?$') then -- Use the greatest badness multiplier if not badness_mult or -- 2.47.3