Skip to content

Commit

Permalink
Merge pull request #22561 from nextcloud/backport/22556/stable18
Browse files Browse the repository at this point in the history
[stable18] Do not keep the part file if the forbidden exception has no retry set
  • Loading branch information
rullzer committed Sep 3, 2020
2 parents 300f571 + 163125f commit d663117
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 @@ -280,6 +280,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 d663117

Please sign in to comment.