Skip to content

Commit

Permalink
Merge pull request #22560 from nextcloud/backport/22556/stable19
Browse files Browse the repository at this point in the history
[stable19] Do not keep the part file if the forbidden exception has no retry set
  • Loading branch information
rullzer committed Sep 3, 2020
2 parents 45dcdc3 + f4dfb96 commit 468f1fc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/dav/lib/Connector/Sabre/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,9 @@ public function put($data) {
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);
Expand Down

0 comments on commit 468f1fc

Please sign in to comment.