1
0
forked from IQ.Lvbs/IQ.Pilot

IQ.Pilot Prebuilt Release @ ab07000

This commit is contained in:
IQ.Lvbs history cleanup
2026-08-22 23:42:42 -05:00
commit 9f9c9a70cc
3729 changed files with 778697 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
#!/usr/bin/env python3
import os
from openpilot.common.swaglog import cloudlog
def get_directory_sort(d: str) -> list[str]:
prefix = ["0"] if d.startswith("2024-") else ["1"]
return prefix + [s.rjust(10, "0") for s in d.rsplit("--", 1)]
def listdir_by_creation(d: str) -> list[str]:
if not os.path.isdir(d):
return []
try:
paths = [f for f in os.listdir(d) if os.path.isdir(os.path.join(d, f))]
return sorted(paths, key=get_directory_sort)
except OSError:
cloudlog.exception("uploader_common.listdir_by_creation_failed")
return []