mirror of
https://github.com/immich-app/immich.git
synced 2025-12-20 01:11:46 +03:00
@@ -2,7 +2,9 @@ export interface RecursiveObject {
|
||||
[key: string]: RecursiveObject;
|
||||
}
|
||||
|
||||
export function buildFolderTree(paths: string[]) {
|
||||
export const normalizeTreePath = (path: string) => path.replace(/^\//, '').replace(/\/$/, '');
|
||||
|
||||
export function buildTree(paths: string[]) {
|
||||
const root: RecursiveObject = {};
|
||||
for (const path of paths) {
|
||||
const parts = path.split('/');
|
||||
Reference in New Issue
Block a user