diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-11-20 09:49:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-20 09:49:57 +0100 |
commit | 8e65f08617d77d29280e9a5ab1d6d8a2fed75f36 (patch) | |
tree | 93706c11a430c7c30aa0fad88b84c4e5eaf6ca45 /apps/dav | |
parent | 2be8930cdf254a923b5c44cbff680c7828108b6d (diff) | |
parent | cef8eadf2a69a38475a67c575957674ae41c136d (diff) | |
download | nextcloud-server-8e65f08617d77d29280e9a5ab1d6d8a2fed75f36.tar.gz nextcloud-server-8e65f08617d77d29280e9a5ab1d6d8a2fed75f36.zip |
Merge pull request #12500 from nextcloud/swift-object-not-found
forward object not found error in swift as dav 404
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); } |