mirror of
https://github.com/nextcloud/server.git
synced 2026-06-14 19:20:35 -04:00
Do not keep the part file if the forbidden exception has retry set to false
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
300f5714d0
commit
163125f482
1 changed files with 3 additions and 0 deletions
|
|
@ -280,6 +280,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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue