mirror of
https://github.com/filebrowser/filebrowser.git
synced 2026-07-18 00:45:47 +00:00
fix(upload): avoid skipping whole folder upload on conflict modal (#5814)
This commit is contained in:
parent
6dcef07f40
commit
f5f8b60b33
1 changed files with 6 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue