fix: sort uniqueDirs to prevent duplicate folder creation on upload
All checks were successful
Automated Container Build / build-and-push (push) Successful in 38s

This commit is contained in:
Elijah 2026-05-26 13:51:43 -07:00
parent a71b8e024a
commit 0221e277a6

View file

@ -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 {}
}