diff --git a/lib/upload/uploader/UploadFileTree.ts b/lib/upload/uploader/UploadFileTree.ts index 1e7651ed0..48d8be39a 100644 --- a/lib/upload/uploader/UploadFileTree.ts +++ b/lib/upload/uploader/UploadFileTree.ts @@ -134,7 +134,10 @@ export class UploadFileTree extends Upload implements IUpload { this.uploadedBytes = 0 this.status = UploadStatus.UPLOADING - await this.#createDirectory(queue) + // if this is not the root of a tree, we need to create the directory first before uploading the children + if (this.#directory.webkitRelativePath) { + await this.#createDirectory(queue) + } if (this.needConflictResolution && this.#conflictsCallback) { const nodes = await this.#conflictsCallback( this.#directory.children.map((node) => basename(node.name)),