Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2020-09-03 22:06:11 +0300
committerGitHub <noreply@github.com>2020-09-03 22:06:11 +0300
commit468f1fc592c9eb0842e1f42106cef878fc990b04 (patch)
tree8035b01c99be081fbc49783249fc2e9e1fafe2a3
parent45dcdc394866e10deea6117c474cd430f650a618 (diff)
parentf4dfb96d8dac7ae56f6439ff94eb068c0f3bc4dc (diff)
Merge pull request #22560 from nextcloud/backport/22556/stable19
[stable19] 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);