From 4543c42721f583c3fc3a629ce32ca61da418d3ca Mon Sep 17 00:00:00 2001 From: Le-Syl21 Date: Sun, 1 Mar 2026 23:41:38 +0100 Subject: [PATCH] fix(files): use destination path for MKCOL during drag & drop folder upload MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit createDirectoryIfNotExists was called with a path relative to the user's DAV root instead of the destination folder. When dragging folder_to_copy into cmdb/, it checked if /folder_to_copy existed (the source — yes) instead of /cmdb/folder_to_copy (the destination — no), skipping the MKCOL entirely and causing a 404 on the subsequent PUT. Co-Authored-By: Claude Opus 4.6 --- apps/files/src/services/DropService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files/src/services/DropService.ts b/apps/files/src/services/DropService.ts index 096ae48ca1fbd..7d2aa1c03a985 100644 --- a/apps/files/src/services/DropService.ts +++ b/apps/files/src/services/DropService.ts @@ -124,7 +124,7 @@ export async function onDropExternalFiles(root: RootDirectory, destination: IFol if (file instanceof Directory) { try { logger.debug('Processing directory', { relativePath }) - await createDirectoryIfNotExists(relativePath) + await createDirectoryIfNotExists(join(destination.path, relativePath)) await uploadDirectoryContents(file, relativePath) } catch (error) { showError(t('files', 'Unable to create the directory {directory}', { directory: file.name }))