Default to false to avoid non-archive files.

This commit is contained in:
Roland 2022-02-02 16:08:18 -07:00
parent c1baeabe1f
commit 2946255fc6
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
2 changed files with 3 additions and 1 deletions

View file

@ -373,7 +373,7 @@ def is_archive_file(path: pathlib.Path) -> bool:
return False
if bool(ARCHIVE_MATCHER.match(path.name)) or bool(NEW_ARCHIVE_MATCHER.match(path.name)):
return True
return True
return False
def _refresh_archives():

View file

@ -384,6 +384,8 @@ def test_refresh_archives(test_session, test_directory):
(example / '2021-10-05 16:20:10-readability.html').touch()
(example / '2021-10-05 16:20:11-readability.json').touch()
(example / 'random file').touch()
(example / '2021-10-05 16:20:10.346827-something.html').mkdir()
(example / '2021-10-05 16:20:10 no extension').touch()
# This single archive is found.
_refresh_archives()