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

Merge pull request #4702 from nextcloud/handle-user-folder-not-available

Stop if user folder is not available
parents 6a0f2fe5 b2c96d0c
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
......
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