From bd692ee753e1d8f57427d5d9fa778cfb31432667 Mon Sep 17 00:00:00 2001 From: Tomek Zebrowski Date: Sun, 5 Apr 2026 15:16:12 +0200 Subject: [PATCH] feat: i,prove drive files date parsing --- src/drive.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/drive.js b/src/drive.js index 1ab4482..7552a84 100644 --- a/src/drive.js +++ b/src/drive.js @@ -518,18 +518,16 @@ class DriveManager { } getFileMetadata(fileName) { - // Robust regex handles both legacy .json and the new .json.gz / .json.json.gz - const match = fileName.match(/-(\d+)-(\d+)(?:\.json|\.gz)+$/); + const match = fileName.match(/-(\d+)-(\d+)(?:\.jsonl|\.json|\.gz)+$/); if (!match) return { date: 'Unknown', length: '?' }; const date = new Date(parseInt(match[1])); - // Restored backward compatibility: return standard ISO string return { date: date.toISOString(), length: match[2] }; } extractTimestamp(fileName) { - const match = fileName.match(/-(\d+)-(\d+)(?:\.json|\.gz)+$/); + const match = fileName.match(/-(\d+)-(\d+)(?:\.jsonl|\.json|\.gz)+$/); return match ? parseInt(match[1]) : 0; }