aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2020-09-03 11:00:24 +0200
committerJulius Härtl <jus@bitgrid.net>2020-09-03 11:00:24 +0200
commit4cf29e598df40da85c7cd29f95737fdc6e65c737 (patch)
tree24f20d034992bea58cac3f74ea8c20d44391c4a3
parent34aca4632574d153c716589a08497c0957b3679f (diff)
downloadnextcloud-server-4cf29e598df40da85c7cd29f95737fdc6e65c737.tar.gz
nextcloud-server-4cf29e598df40da85c7cd29f95737fdc6e65c737.zip
Do not keep the part file if the forbidden exception has retry set to false
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-rw-r--r--apps/dav/lib/Connector/Sabre/File.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php
index 4e456616059..476824a2e36 100644
--- a/apps/dav/lib/Connector/Sabre/File.php
+++ b/apps/dav/lib/Connector/Sabre/File.php
@@ -288,6 +288,9 @@ class File extends Node implements IFile {
throw new Exception('Could not rename part file to final file');
}
} catch (ForbiddenException $ex) {
+ if (!$ex->getRetry()) {
+ $partStorage->unlink($internalPartPath);
+ }
throw new DAVForbiddenException($ex->getMessage(), $ex->getRetry());
} catch (\Exception $e) {
$partStorage->unlink($internalPartPath);