diff options
author | Julius Härtl <jus@bitgrid.net> | 2020-09-03 11:00:24 +0200 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2020-09-03 11:06:41 +0000 |
commit | f4dfb96d8dac7ae56f6439ff94eb068c0f3bc4dc (patch) | |
tree | 8035b01c99be081fbc49783249fc2e9e1fafe2a3 /apps/dav/lib/Connector | |
parent | 45dcdc394866e10deea6117c474cd430f650a618 (diff) | |
download | nextcloud-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.php | 3 |
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); |