From d32a7d7c3a4b9cbb748cb71d236c78401ab42a70 Mon Sep 17 00:00:00 2001 From: Cameron Cordes Date: Fri, 8 May 2026 16:22:57 -0400 Subject: [PATCH] memories: restore early-era Snapchat unix-epoch filenames MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The recent blanket "snapchat-" prefix denylist (43f8f83) rejected ALL Snapchat-prefixed filenames from timestamp parsing, which fixed the sequential-ID false positives but also broke real unix-second filenames from Snapchat's early era. `Snapchat-1383929602.jpg` (2013-11-08 16:53:22 UTC) now falls through to fs_time — and on files with broken filesystem metadata, fs_time pins to 1970. Replace the blanket prefix denial with a tighter discriminator: - exactly 10 captured digits AND timestamp >= 2011-09-23 (Snapchat launch) → real unix epoch, accept - any other length under this prefix → sequential ID, reject This keeps the existing rejections intact: Snapchat-1021849065.mp4 → 10 digits, 2002 < launch → reject Snapchat-1751031586660373917.jpg → 19 digits truncates to 16 → reject And restores the regression case: Snapchat-1383929602.jpg → 10 digits, 2013 ≥ launch → accept Co-Authored-By: Claude Opus 4.7 (1M context) --- src/memories.rs | 55 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 39 insertions(+), 16 deletions(-) diff --git a/src/memories.rs b/src/memories.rs index d31cbb8..4b1682b 100644 --- a/src/memories.rs +++ b/src/memories.rs @@ -206,14 +206,20 @@ pub fn extract_date_from_filename(filename: &str) -> Option Option