From: Julius Härtl Date: Thu, 3 Sep 2020 09:00:24 +0000 (+0200) Subject: Do not keep the part file if the forbidden exception has retry set to false X-Git-Tag: v20.0.0beta3~1^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4cf29e598df40da85c7cd29f95737fdc6e65c737;p=nextcloud-server.git Do not keep the part file if the forbidden exception has retry set to false Signed-off-by: Julius Härtl --- 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);