end
end
-- Filename rules
+ local function check_file(fn)
+ _.each(function(r)
+ match_filename(r, fn)
+ end,
+ _.filter(function(r)
+ return pre_filter == r['prefilter'] and r['type'] == 'filename'
+ end, rules))
+ end
+
local parts = task:get_parts()
for i,p in ipairs(parts) do
- local fn = p:get_filename()
- if fn then
- _.each(function(r)
- match_filename(r, fn)
- end,
- _.filter(function(r)
- return pre_filter == r['prefilter'] and r['type'] == 'filename'
- end, rules))
+ if p:is_archive() then
+ local fnames = p:get_archive():get_files()
+
+ for ii,fn in ipairs(fnames) do
+ check_file(fn)
+ end
+ else
+ local fn = p:get_filename()
+ if fn then
+ check_file(fn)
+ end
end
end
-- RBL rules