mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-29 03:16:22 -05:00
Default to false to avoid non-archive files.
This commit is contained in:
parent
c1baeabe1f
commit
2946255fc6
2 changed files with 3 additions and 1 deletions
|
|
@ -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():
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue