diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2018-04-11 16:03:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-11 16:03:12 +0200 |
commit | fed9140abdecdfbfc3c5f6a7c24779dac66ac0e9 (patch) | |
tree | a67046dfeff0238458254e3c8768250e3bf654fa /apps/dav | |
parent | 2626d11f787a79934b36692fcaab58e9982ec7f7 (diff) | |
parent | e6a7ddc1c6e5104c65f259ebb6e9d21e5d476621 (diff) | |
download | nextcloud-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.php | 6 |
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"); } |