Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2018-11-16 22:21:21 +0300
committerMorris Jobke <hey@morrisjobke.de>2018-11-19 13:34:38 +0300
commit35251928d57092a50529da8d439c0de3cf428298 (patch)
treee8583cb84419febb9d8f11b83c8a579797f1944a /apps/dav/lib/Connector/Sabre/File.php
parenta4d81ba1641db8136b13d2bb7b7c0176c916ec7e (diff)
forward object not found error in switch as dav 404
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/dav/lib/Connector/Sabre/File.php')
-rw-r--r--apps/dav/lib/Connector/Sabre/File.php4
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);
}