]> source.dussan.org Git - nextcloud-server.git/commitdiff
Stop if user folder is not available 4702/head
authorMorris Jobke <hey@morrisjobke.de>
Thu, 4 May 2017 22:34:01 +0000 (19:34 -0300)
committerMorris Jobke <hey@morrisjobke.de>
Tue, 9 May 2017 16:26:08 +0000 (11:26 -0500)
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
apps/dav/lib/Files/FilesHome.php

index 9c8f9835d7c45fe83c0153a9cfc43e19ffc9b3c0..78fd1f4d6d6398ccf7ee7eaf0fbba1352cda3ce1 100644 (file)
@@ -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);
        }