From c34d4922d1984154a3312c601c17711301bff2a0 Mon Sep 17 00:00:00 2001 From: Wytamma Wirth Date: Thu, 15 Feb 2024 18:26:23 +1100 Subject: [PATCH] :sparkles: sort files alpha #33 --- backend/beastiary/api/endpoints/explorer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/beastiary/api/endpoints/explorer.py b/backend/beastiary/api/endpoints/explorer.py index dbca988..4f5da14 100644 --- a/backend/beastiary/api/endpoints/explorer.py +++ b/backend/beastiary/api/endpoints/explorer.py @@ -38,7 +38,7 @@ def list_directory(path: Optional[str] = None) -> dict: if not name.startswith(".") ] - sorted_files = sorted(files) + sorted_files = sorted(files, key=lambda d: d["name"]) sorted_folders = sorted(sorted_files, key=lambda d: d["is_dir"], reverse=True) directory = {