diff options
author | Julius Härtl <jus@bitgrid.net> | 2023-05-10 08:34:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-10 08:34:25 +0200 |
commit | b935725b70756a9b9f5ef0f951c6ce11944c7f2d (patch) | |
tree | 5ac99b89f7ef983c2a1cc570c9d4dc379f459124 /apps/dav | |
parent | 46bb952ba51411f27d92f06ea1cc9bd8e7158e34 (diff) | |
parent | d920e65dc5faa07a27afadfc3666f11f679c9f4a (diff) | |
download | nextcloud-server-b935725b70756a9b9f5ef0f951c6ce11944c7f2d.tar.gz nextcloud-server-b935725b70756a9b9f5ef0f951c6ce11944c7f2d.zip |
Merge pull request #38100 from tanganellilore/fix_delete_ChunkingV2Plugin
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/Upload/ChunkingV2Plugin.php | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/apps/dav/lib/Upload/ChunkingV2Plugin.php b/apps/dav/lib/Upload/ChunkingV2Plugin.php index cb7c802125c..6b660fb7c6f 100644 --- a/apps/dav/lib/Upload/ChunkingV2Plugin.php +++ b/apps/dav/lib/Upload/ChunkingV2Plugin.php @@ -255,17 +255,15 @@ class ChunkingV2Plugin extends ServerPlugin { public function beforeDelete(RequestInterface $request, ResponseInterface $response) { try { - $this->prepareUpload($request->getPath()); - if (!$this->uploadFolder instanceof UploadFolder) { - return true; - } - - [$storage, $storagePath] = $this->getUploadStorage($this->uploadPath); - $storage->cancelChunkedWrite($storagePath, $this->uploadId); - return true; - } catch (NotFound $e) { + $this->prepareUpload(dirname($request->getPath())); + $this->checkPrerequisites(); + } catch (StorageInvalidException|BadRequest|NotFound $e) { return true; } + + [$storage, $storagePath] = $this->getUploadStorage($this->uploadPath); + $storage->cancelChunkedWrite($storagePath, $this->uploadId); + return true; } /** |