diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-05-04 19:34:01 -0300 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-05-09 11:26:08 -0500 |
commit | b2c96d0c23236dad1f6c561d6784756ac5cb1e13 (patch) | |
tree | 4c68f898096646e361cfc01e041d690d8d08c749 /apps/dav | |
parent | 6a0f2fe52d03c7d109c51b43206cddcb92346c1e (diff) | |
download | nextcloud-server-b2c96d0c23236dad1f6c561d6784756ac5cb1e13.tar.gz nextcloud-server-b2c96d0c23236dad1f6c561d6784756ac5cb1e13.zip |
Stop if user folder is not available
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/Files/FilesHome.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/dav/lib/Files/FilesHome.php b/apps/dav/lib/Files/FilesHome.php index 9c8f9835d7c..78fd1f4d6d6 100644 --- a/apps/dav/lib/Files/FilesHome.php +++ b/apps/dav/lib/Files/FilesHome.php @@ -22,6 +22,7 @@ namespace OCA\DAV\Files; use OCA\DAV\Connector\Sabre\Directory; +use OCP\Files\FileInfo; use Sabre\DAV\Exception\Forbidden; use Sabre\HTTP\URLUtil; @@ -41,6 +42,9 @@ class FilesHome extends Directory { $this->principalInfo = $principalInfo; $view = \OC\Files\Filesystem::getView(); $rootInfo = $view->getFileInfo(''); + if (!($rootInfo instanceof FileInfo)) { + throw new \Exception('Home does not exist'); + } parent::__construct($view, $rootInfo); } |