aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2020-09-03 13:01:08 +0200
committerGitHub <noreply@github.com>2020-09-03 13:01:08 +0200
commitd20a11f171e660a4514c8ce3cf4a23ab6488207f (patch)
treec8da48623432c37f10336581365919ebde8d551f
parentbe223d1e46c8db52c58d43051d96c85b513c69ac (diff)
parent4cf29e598df40da85c7cd29f95737fdc6e65c737 (diff)
downloadnextcloud-server-d20a11f171e660a4514c8ce3cf4a23ab6488207f.tar.gz
nextcloud-server-d20a11f171e660a4514c8ce3cf4a23ab6488207f.zip
Merge pull request #22556 from nextcloud/bugfix/noid/cleanup-part-file
Do not keep the part file if the forbidden exception has no retry set
-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);