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
path: root/apps/dav
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:36:33 +0300
commitf43cfd9275d7f6d1be325c8630e19b0bf4e81b77 (patch)
treea3e60384bed1acd4a941c1b1cd9754fd06e3beb9 /apps/dav
parenta79c7c7b0554fa09bf5132a08cb2f53cb5470b91 (diff)
forward object not found error in swift 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.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 9e927ff85e5..66400c95857 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;
@@ -583,6 +584,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);
}