mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-28 01:52:06 +08:00
uploader.py/listdir_by_creation: list directories only (#30806)
list only directories Co-authored-by: Comma Device <device@comma.ai> old-commit-hash: a1f53c70e6d955898a3ddb95b74d1d6b3f40da3e
This commit is contained in:
@@ -50,7 +50,7 @@ def get_directory_sort(d: str) -> List[str]:
|
||||
|
||||
def listdir_by_creation(d: str) -> List[str]:
|
||||
try:
|
||||
paths = os.listdir(d)
|
||||
paths = [f for f in os.listdir(d) if os.path.isdir(os.path.join(d, f))]
|
||||
paths = sorted(paths, key=get_directory_sort)
|
||||
return paths
|
||||
except OSError:
|
||||
|
||||
Reference in New Issue
Block a user