mirror of
https://github.com/immich-app/immich.git
synced 2025-01-21 00:52:43 -05:00
parent
868aedd212
commit
b653a20d15
1 changed files with 3 additions and 0 deletions
|
@ -6,6 +6,9 @@ export const normalizeTreePath = (path: string) => path.replace(/^\//, '').repla
|
||||||
|
|
||||||
export function buildTree(paths: string[]) {
|
export function buildTree(paths: string[]) {
|
||||||
const root: RecursiveObject = {};
|
const root: RecursiveObject = {};
|
||||||
|
|
||||||
|
paths.sort();
|
||||||
|
|
||||||
for (const path of paths) {
|
for (const path of paths) {
|
||||||
const parts = path.split('/');
|
const parts = path.split('/');
|
||||||
let current = root;
|
let current = root;
|
||||||
|
|
Loading…
Add table
Reference in a new issue