mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #9148 from nextcloud/dav-read-exception
transform exception during file read to sabre exceptions
This commit is contained in:
commit
fed9140abd
1 changed files with 5 additions and 1 deletions
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue