From 43f8f83d80a2125fa97052ce25599ff5300fe450 Mon Sep 17 00:00:00 2001 From: Cameron Cordes Date: Thu, 7 May 2026 12:17:40 -0400 Subject: [PATCH] memories: deny Snapchat-prefixed filenames from timestamp parsing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Snapchat assigns sequential IDs that happen to overlap real epoch values, so the 10-16 digit timestamp regex matched and produced 2002-era dates for files actually saved in 2016/2021. The digits themselves are indistinguishable from a unix timestamp, so we dispatch on the source-app prefix instead. Case-insensitive, extensible for future apps that exhibit the same pattern. Reported cases: Snapchat-1021849065.mp4 → 2002-05-19 (actual 2021) Snapchat-1751031586660373917.jpg → 2002-09-09 (actual 2016) Co-Authored-By: Claude Opus 4.7 (1M context) --- src/memories.rs | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/memories.rs b/src/memories.rs index 909be99..0153d2b 100644 --- a/src/memories.rs +++ b/src/memories.rs @@ -206,6 +206,20 @@ pub fn extract_date_from_filename(filename: &str) -> Option