Skip to content

Commit

Permalink
Do not keep the part file if the forbidden exception has retry set to…
Browse files Browse the repository at this point in the history
… false

Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliushaertl authored and backportbot[bot] committed Sep 3, 2020
1 parent 45dcdc3 commit f4dfb96
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 f4dfb96

Please sign in to comment.