fix(upload): avoid skipping whole folder upload on conflict modal (#5814)

This commit is contained in:
Sergio
2026-03-11 11:34:57 -07:00
committed by GitHub
parent 6dcef07f40
commit f5f8b60b33

View File

@@ -23,12 +23,16 @@ export function checkConflict(
for (let i = 0; i < files.length; i++) {
const file = files[i];
let name = file.name;
const name = file.name;
if (folder_upload && file.isDir) {
const dirs = file.fullPath?.split("/");
// For folder uploads, destination listing is flat and only contains
// top-level entries. Treating every nested file as a conflict when the
// parent folder exists blocks the whole upload (see #5798), so skip
// preflight conflict detection for nested files.
if (dirs && dirs.length > 1) {
name = dirs[0];
continue;
}
}