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
45dcdc3948
commit
f4dfb96d8d
|
@ -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