fix: improve MLG file timestamp handling in scan_thordata function. Uses file metadata, not unit reported time.

This commit is contained in:
2026-04-02 17:45:57 -04:00
parent 8c133f2d6f
commit 4742ed92ba
+9 -1
View File
@@ -153,8 +153,16 @@ def scan_thordata(root: str) -> Dict[str, Dict[str, Any]]:
parsed = parse_mlg_filename(fname)
if not parsed:
continue
unit_id, ts = parsed
unit_id, _ = parsed # keep unit_id only
full_path = os.path.join(unit_path, fname)
try:
mtime = os.path.getmtime(full_path)
ts = datetime.fromtimestamp(mtime)
except Exception:
continue
current = unit_map.get(unit_id)
if current is None or ts > current["last_call"]:
unit_map[unit_id] = {