Skip to content

High performance self-hosted photo and video management solution.

fix(web): sort folders (#12038)

Alexb653a20d1562
diff --git a/web/src/lib/utils/tree-utils.ts b/web/src/lib/utils/tree-utils.ts
index cc17784eb6..13fb6c1605 100644
--- a/web/src/lib/utils/tree-utils.ts
+++ b/web/src/lib/utils/tree-utils.ts
@@ -6,6 +6,9 @@ export const normalizeTreePath = (path: string) => path.replace(/^\//, '').repla
export function buildTree(paths: string[]) {
const root: RecursiveObject = {};
+
+ paths.sort();
+
for (const path of paths) {
const parts = path.split('/');
let current = root;