Merge pull request #22560 from nextcloud/backport/22556/stable19
[stable19] Do not keep the part file if the forbidden exception has no retry set
This commit is contained in:
commit
468f1fc592
|
@ -288,6 +288,9 @@ class File extends Node implements IFile {
|
||||||
throw new Exception('Could not rename part file to final file');
|
throw new Exception('Could not rename part file to final file');
|
||||||
}
|
}
|
||||||
} catch (ForbiddenException $ex) {
|
} catch (ForbiddenException $ex) {
|
||||||
|
if (!$ex->getRetry()) {
|
||||||
|
$partStorage->unlink($internalPartPath);
|
||||||
|
}
|
||||||
throw new DAVForbiddenException($ex->getMessage(), $ex->getRetry());
|
throw new DAVForbiddenException($ex->getMessage(), $ex->getRetry());
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$partStorage->unlink($internalPartPath);
|
$partStorage->unlink($internalPartPath);
|
||||||
|
|
Loading…
Reference in New Issue