diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2017-05-09 22:50:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-09 22:50:52 +0200 |
commit | 6a4734d78efed86e5aa134cae980aa7e79e9d48f (patch) | |
tree | 4c68f898096646e361cfc01e041d690d8d08c749 | |
parent | 6a0f2fe52d03c7d109c51b43206cddcb92346c1e (diff) | |
parent | b2c96d0c23236dad1f6c561d6784756ac5cb1e13 (diff) | |
download | nextcloud-server-6a4734d78efed86e5aa134cae980aa7e79e9d48f.tar.gz nextcloud-server-6a4734d78efed86e5aa134cae980aa7e79e9d48f.zip |
Merge pull request #4702 from nextcloud/handle-user-folder-not-available
Stop if user folder is not available
-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); } |