diff options
Diffstat (limited to 'apps/dav/lib/Connector/Sabre/File.php')
-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); } |