diff --git a/qutebrowser/browser/adblock.py b/qutebrowser/browser/adblock.py index f807fee19..862ec18fa 100644 --- a/qutebrowser/browser/adblock.py +++ b/qutebrowser/browser/adblock.py @@ -175,8 +175,7 @@ class HostBlocker: filename = url.toLocalFile() if os.path.isdir(filename): for filenames in os.scandir(filename): - if not filenames.name.startswith('.')\ - and filenames.is_file(): + if filenames.is_file(): self._import_local(filenames.path) else: self._import_local(filename) diff --git a/tests/unit/browser/test_adblock.py b/tests/unit/browser/test_adblock.py index f9a695f5b..8bcbf3eb6 100644 --- a/tests/unit/browser/test_adblock.py +++ b/tests/unit/browser/test_adblock.py @@ -452,4 +452,4 @@ def test_add_directory(config_stub, basedir, download_stub, config_stub.val.content.host_blocking.enabled = True host_blocker = adblock.HostBlocker() host_blocker.adblock_update() - assert len(host_blocker._blocked_hosts) == (len(blocklist_hosts2) * 2) + assert len(host_blocker._blocked_hosts) == len(blocklist_hosts2) * 2