Skip to content
Snippets Groups Projects
Unverified Commit fed9140a authored by Roeland Jago Douma's avatar Roeland Jago Douma Committed by GitHub
Browse files

Merge pull request #9148 from nextcloud/dav-read-exception

transform exception during file read to sabre exceptions
parents 2626d11f e6a7ddc1
No related branches found
No related tags found
No related merge requests found
...@@ -332,7 +332,11 @@ class File extends Node implements IFile { ...@@ -332,7 +332,11 @@ class File extends Node implements IFile {
// do a if the file did not exist // do a if the file did not exist
throw new NotFound(); 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) { if ($res === false) {
throw new ServiceUnavailable("Could not open file"); throw new ServiceUnavailable("Could not open file");
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment