mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
Merge pull request #22556 from nextcloud/bugfix/noid/cleanup-part-file
Do not keep the part file if the forbidden exception has no retry set
This commit is contained in:
commit
d20a11f171
1 changed files with 3 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue