summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Connector
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2020-09-03 11:00:24 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2020-09-03 11:06:41 +0000
commitf4dfb96d8dac7ae56f6439ff94eb068c0f3bc4dc (patch)
tree8035b01c99be081fbc49783249fc2e9e1fafe2a3 /apps/dav/lib/Connector
parent45dcdc394866e10deea6117c474cd430f650a618 (diff)
downloadnextcloud-server-f4dfb96d8dac7ae56f6439ff94eb068c0f3bc4dc.tar.gz
nextcloud-server-f4dfb96d8dac7ae56f6439ff94eb068c0f3bc4dc.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>
Diffstat (limited to 'apps/dav/lib/Connector')
-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);