aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-04-11 16:03:12 +0200
committerGitHub <noreply@github.com>2018-04-11 16:03:12 +0200
commitfed9140abdecdfbfc3c5f6a7c24779dac66ac0e9 (patch)
treea67046dfeff0238458254e3c8768250e3bf654fa /apps/dav
parent2626d11f787a79934b36692fcaab58e9982ec7f7 (diff)
parente6a7ddc1c6e5104c65f259ebb6e9d21e5d476621 (diff)
downloadnextcloud-server-fed9140abdecdfbfc3c5f6a7c24779dac66ac0e9.tar.gz
nextcloud-server-fed9140abdecdfbfc3c5f6a7c24779dac66ac0e9.zip
Merge pull request #9148 from nextcloud/dav-read-exception
transform exception during file read to sabre exceptions
Diffstat (limited to 'apps/dav')
-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");
}