diff --git a/frontend/src/components/FileExplorer.tsx b/frontend/src/components/FileExplorer.tsx index 9218449..fb92fd7 100644 --- a/frontend/src/components/FileExplorer.tsx +++ b/frontend/src/components/FileExplorer.tsx @@ -1095,7 +1095,8 @@ export default function FileExplorer({ onLogout }: FileExplorerProps) { if (path) uniqueDirs.add(currentPath === '.' ? path : `${currentPath}/${path}`); }); - for (const dir of Array.from(uniqueDirs)) { + const sortedDirs = Array.from(uniqueDirs).sort((a, b) => a.length - b.length); + for (const dir of sortedDirs) { try { await api.createFolder(dir); } catch {} }