From 72fb023c1b2869c34b4a839e0c649b29616c5604 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 12 Sep 2019 11:48:28 +0100 Subject: [PATCH] [Minor] Fix checks logic --- 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 32d9d62f3..b4c71e3f2 100644 --- a/src/plugins/lua/mime_types.lua +++ b/src/plugins/lua/mime_types.lua @@ -244,7 +244,7 @@ local function check_mime_type(task) detected = lua_magic_types[detected_ext] end - if not ext or (detected_ext and ext ~= detected_ext) then + if detected_ext and ((not ext) or ext ~= detected_ext) then -- Try to find extension by real content type check_filename('detected.' .. detected_ext, detected.ct, false, part, nil) -- 2.39.5