fix: directory conflict checking
parent
a47b69bcec
commit
7e5beeff46
|
@ -6,10 +6,7 @@ export function checkConflict(files, items) {
|
||||||
items = []
|
items = []
|
||||||
}
|
}
|
||||||
|
|
||||||
let folder_upload = false
|
let folder_upload = files[0].fullPath !== undefined
|
||||||
if (files[0].fullPath !== undefined) {
|
|
||||||
folder_upload = true
|
|
||||||
}
|
|
||||||
|
|
||||||
let conflict = false
|
let conflict = false
|
||||||
for (let i = 0; i < files.length; i++) {
|
for (let i = 0; i < files.length; i++) {
|
||||||
|
@ -69,7 +66,7 @@ export function scanFiles(dt) {
|
||||||
const dir = {
|
const dir = {
|
||||||
isDir: true,
|
isDir: true,
|
||||||
size: 0,
|
size: 0,
|
||||||
path: `${directory}${entry.name}`
|
fullPath: `${directory}${entry.name}`
|
||||||
}
|
}
|
||||||
|
|
||||||
contents.push(dir)
|
contents.push(dir)
|
||||||
|
@ -112,7 +109,7 @@ export function handleFiles(files, path, overwrite = false) {
|
||||||
|
|
||||||
if (file.isDir) {
|
if (file.isDir) {
|
||||||
itemPath = path
|
itemPath = path
|
||||||
let folders = file.path.split("/")
|
let folders = file.fullPath.split("/")
|
||||||
|
|
||||||
for (let i = 0; i < folders.length; i++) {
|
for (let i = 0; i < folders.length; i++) {
|
||||||
let folder = folders[i]
|
let folder = folders[i]
|
||||||
|
|
Loading…
Reference in New Issue