summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/dav/lib/Files/FilesHome.php4
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);
}