From fe707d0e5451b8d18e62fcb3d0028e6fc453c2da Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 7 May 2020 14:38:09 +0100 Subject: [Minor] Get rid of numeric string:match in honor of tonumber --- 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 6cf306b2b..24b88da1d 100644 --- a/src/plugins/lua/mime_types.lua +++ b/src/plugins/lua/mime_types.lua @@ -462,7 +462,7 @@ local function check_mime_type(task) if enc_ext and settings['bad_extensions'][enc_ext] - and not string.match(ext2, '^%d+$') + and not tonumber(ext2) and enc_ext ~= ext2 then task:insert_result(settings['symbol_double_extension'], 2.0, string.format("%s!=%s", ext2, enc_ext)) -- cgit v1.2.3