]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix usage of filename parts
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 18 Feb 2017 21:09:43 +0000 (21:09 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 18 Feb 2017 21:09:43 +0000 (21:09 +0000)
src/plugins/lua/mime_types.lua

index 88047a5fd295bea6b48e95bc44c16fffbd4b08e7..fe530f19360b26c9657d98973b34ae4e84e4bd2b 100644 (file)
@@ -93,10 +93,11 @@ local function check_mime_type(task)
       ext = nil
     end
 
-    return ext
+    return ext,parts
   end
   local function check_filename(fname, ct, is_archive)
-    local ext = gen_extension(fname)
+    local ext,parts = gen_extension(fname)
+
     local function check_extension(badness_mult)
       if badness_mult then
         if #parts > 2