fix match filters

This commit is contained in:
Alfonso Corrado 2025-07-19 14:49:04 +02:00 committed by Felipe
parent 82ff2de3dc
commit 999aa211ae

View File

@ -204,7 +204,7 @@ class WaybackMachineDownloader
def match_only_filter file_url def match_only_filter file_url
if @only_filter if @only_filter
only_filter_regex = @only_filter.to_regex only_filter_regex = @only_filter.to_regex(detect: true)
if only_filter_regex if only_filter_regex
only_filter_regex =~ file_url only_filter_regex =~ file_url
else else
@ -217,7 +217,7 @@ class WaybackMachineDownloader
def match_exclude_filter file_url def match_exclude_filter file_url
if @exclude_filter if @exclude_filter
exclude_filter_regex = @exclude_filter.to_regex exclude_filter_regex = @exclude_filter.to_regex(detect: true)
if exclude_filter_regex if exclude_filter_regex
exclude_filter_regex =~ file_url exclude_filter_regex =~ file_url
else else