From 767840460498d078fd666310b343a9b14ad488a2 Mon Sep 17 00:00:00 2001 From: GMrrc <143954951+GMrrc@users.noreply.github.com> Date: Wed, 11 Dec 2024 16:24:50 +0100 Subject: [PATCH] Update FileTable.vue --- src/components/FileTable.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/FileTable.vue b/src/components/FileTable.vue index 27a4652..5b4fee5 100644 --- a/src/components/FileTable.vue +++ b/src/components/FileTable.vue @@ -444,14 +444,20 @@ export default { async moveListOfFiles(files) { for (const file of files.children) { this.transferProgress += 100 / files.children.length; + let listOfFolder = []; if (file.isDirectory) { //just create the folder await this.createFolder(file, file.parentPath + '/'); + listOfFolder.push(file.parentPath + '/' + file.name); } else { if (file.content && typeof file.content.arrayBuffer === 'function') { file.content = await file.content.arrayBuffer(); } - await this.moveFileToTarget(file, file.parentPath + '/'); + if (listOfFolder.includes(file.parentPath)) { + await this.moveFileToTarget(file, file.parentPath + '/', file.name); + } else { + await this.createFolder(file, ''); + } } } },