mirror of
https://github.com/nextcloud/server.git
synced 2026-03-18 16:45:22 -04:00
Merge pull request #22561 from nextcloud/backport/22556/stable18
[stable18] Do not keep the part file if the forbidden exception has no retry set
This commit is contained in:
commit
d6631170ee
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