From cc8f7048636e6f0d5e3669790601282ab4a91c93 Mon Sep 17 00:00:00 2001 From: Christoph Fiehe Date: Fri, 27 Oct 2023 09:40:19 +0200 Subject: [PATCH] FIX: https://github.com/nextcloud/server/issues/38801 This commit fixes the problem with missing metadata for chunked uploads. Signed-off-by: Christoph Fiehe --- apps/dav/lib/Upload/ChunkingV2Plugin.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/dav/lib/Upload/ChunkingV2Plugin.php b/apps/dav/lib/Upload/ChunkingV2Plugin.php index 97ae51fbe380b..78004e43063a4 100644 --- a/apps/dav/lib/Upload/ChunkingV2Plugin.php +++ b/apps/dav/lib/Upload/ChunkingV2Plugin.php @@ -144,7 +144,7 @@ public function afterMkcol(RequestInterface $request, ResponseInterface $respons public function beforePut(RequestInterface $request, ResponseInterface $response): bool { try { - $this->prepareUpload(dirname($request->getPath())); + $this->prepareUpload(basename(dirname($request->getPath()))); $this->checkPrerequisites(); } catch (StorageInvalidException|BadRequest|NotFound $e) { return true; @@ -189,7 +189,7 @@ public function beforePut(RequestInterface $request, ResponseInterface $response public function beforeMove($sourcePath, $destination): bool { try { - $this->prepareUpload(dirname($sourcePath)); + $this->prepareUpload(basename(dirname($sourcePath))); $this->checkPrerequisites(); } catch (StorageInvalidException|BadRequest|NotFound|PreconditionFailed $e) { return true; @@ -255,7 +255,7 @@ public function beforeMove($sourcePath, $destination): bool { public function beforeDelete(RequestInterface $request, ResponseInterface $response) { try { - $this->prepareUpload(dirname($request->getPath())); + $this->prepareUpload(basename(dirname($request->getPath()))); $this->checkPrerequisites(); } catch (StorageInvalidException|BadRequest|NotFound $e) { return true;