-- check filenames in archives
if p:is_archive() then
local arch = p:get_archive()
- local filelist = arch:get_files_full()
+ local filelist = arch:get_files_full(1000)
for _,f in ipairs(filelist) do
ext,ext2 = gen_extension(f.name)
- if match_filter(task, ext, rule.mime_parts_filter_ext)
- or match_filter(task, ext2, rule.mime_parts_filter_ext) then
- lua_util.debugm(rule.name, task, '%s: extension matched in archive: %s', rule.log_prefix, ext)
- extension_check = true
- end
- if match_filter(task, f.name, rule.mime_parts_filter_regex) then
- content_type_check = true
+ if match_filter(task, rule, ext, rule.mime_parts_filter_ext, 'ext')
+ or match_filter(task, rule, ext2, rule.mime_parts_filter_ext, 'ext') then
+ lua_util.debugm(rule.name, task, '%s: extension matched in archive: |%s|%s|', rule.log_prefix, ext, ext2)
+ --lua_util.debugm(rule.name, task, '%s: extension matched in archive: %s', rule.log_prefix, ext)
+ return true
+ elseif match_filter(task, rule, f.name, rule.mime_parts_filter_regex, 'regex') then
+ lua_util.debugm(rule.name, task, '%s: filename regex matched in archive', rule.log_prefix)
+ return true
end
end
end