Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ac8b58c193 | |||
| 4742ed92ba |
+9
-1
@@ -168,8 +168,16 @@ def scan_thordata(root: str) -> Dict[str, Dict[str, Any]]:
|
|||||||
parsed = parse_mlg_filename(fname)
|
parsed = parse_mlg_filename(fname)
|
||||||
if not parsed:
|
if not parsed:
|
||||||
continue
|
continue
|
||||||
unit_id, ts = parsed
|
|
||||||
|
unit_id, _ = parsed # keep unit_id only
|
||||||
full_path = os.path.join(unit_path, fname)
|
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)
|
current = unit_map.get(unit_id)
|
||||||
if current is None or ts > current["last_call"]:
|
if current is None or ts > current["last_call"]:
|
||||||
unit_map[unit_id] = {
|
unit_map[unit_id] = {
|
||||||
|
|||||||
Reference in New Issue
Block a user