From a32e8fa77fd5c3408e87fadc637342aaacddc2a7 Mon Sep 17 00:00:00 2001 From: Jon Michael Aanes Date: Mon, 4 Nov 2024 22:32:20 +0100 Subject: [PATCH] Fix: Inverted sorting --- libpurple_to_markdown/synctech_sms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpurple_to_markdown/synctech_sms.py b/libpurple_to_markdown/synctech_sms.py index 55f1748..7e4009e 100644 --- a/libpurple_to_markdown/synctech_sms.py +++ b/libpurple_to_markdown/synctech_sms.py @@ -67,7 +67,7 @@ def sms_soup_to_message(soup: bs4.BeautifulSoup) -> Message: def select_newest_file_in_dir(path: Path) -> Path: - return min( + return max( (p for p in path.iterdir() if p.suffix == '.xml' and 'sms' in p.name), key=lambda p: p.stat().st_atime_ns, )