summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2018-04-11 14:45:35 +0200
committerRobin Appelman <robin@icewind.nl>2018-04-11 14:45:35 +0200
commite6a7ddc1c6e5104c65f259ebb6e9d21e5d476621 (patch)
treebf708197a52af565ad28d66a04b042ccba48d527 /apps
parent7a3ce073dac286eedfa3003c4f8567827cd5f10b (diff)
downloadnextcloud-server-e6a7ddc1c6e5104c65f259ebb6e9d21e5d476621.tar.gz
nextcloud-server-e6a7ddc1c6e5104c65f259ebb6e9d21e5d476621.zip
transform exception during file read to sabre exceptions
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/lib/Connector/Sabre/File.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php
index 6a467e9eff2..e577510b69e 100644
--- a/apps/dav/lib/Connector/Sabre/File.php
+++ b/apps/dav/lib/Connector/Sabre/File.php
@@ -332,7 +332,11 @@ class File extends Node implements IFile {
// do a if the file did not exist
throw new NotFound();
}
- $res = $this->fileView->fopen(ltrim($this->path, '/'), 'rb');
+ try {
+ $res = $this->fileView->fopen(ltrim($this->path, '/'), 'rb');
+ } catch (\Exception $e) {
+ $this->convertToSabreException($e);
+ }
if ($res === false) {
throw new ServiceUnavailable("Could not open file");
}