diff options
author | Robin Appelman <robin@icewind.nl> | 2018-11-16 22:21:21 +0300 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-11-19 13:34:38 +0300 |
commit | 35251928d57092a50529da8d439c0de3cf428298 (patch) | |
tree | e8583cb84419febb9d8f11b83c8a579797f1944a /apps/dav | |
parent | a4d81ba1641db8136b13d2bb7b7c0176c916ec7e (diff) |
forward object not found error in switch as dav 404
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/File.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php index fc30393bb46..f948f0f552d 100644 --- a/apps/dav/lib/Connector/Sabre/File.php +++ b/apps/dav/lib/Connector/Sabre/File.php @@ -50,6 +50,7 @@ use OCP\Files\ForbiddenException; use OCP\Files\InvalidContentException; use OCP\Files\InvalidPathException; use OCP\Files\LockNotAcquiredException; +use OCP\Files\NotFoundException; use OCP\Files\NotPermittedException; use OCP\Files\Storage; use OCP\Files\StorageNotAvailableException; @@ -592,6 +593,9 @@ class File extends Node implements IFile { if ($e instanceof StorageNotAvailableException) { throw new ServiceUnavailable('Failed to write file contents: ' . $e->getMessage(), 0, $e); } + if ($e instanceof NotFoundException) { + throw new NotFound('File not found: ' . $e->getMessage(), 0, $e); + } throw new \Sabre\DAV\Exception($e->getMessage(), 0, $e); } |