aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2023-05-10 08:34:25 +0200
committerGitHub <noreply@github.com>2023-05-10 08:34:25 +0200
commitb935725b70756a9b9f5ef0f951c6ce11944c7f2d (patch)
tree5ac99b89f7ef983c2a1cc570c9d4dc379f459124 /apps/dav
parent46bb952ba51411f27d92f06ea1cc9bd8e7158e34 (diff)
parentd920e65dc5faa07a27afadfc3666f11f679c9f4a (diff)
downloadnextcloud-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.php16
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;
}
/**