Merge pull request #4702 from nextcloud/handle-user-folder-not-available
Stop if user folder is not available
This commit is contained in:
commit
6a4734d78e
|
@ -22,6 +22,7 @@
|
||||||
namespace OCA\DAV\Files;
|
namespace OCA\DAV\Files;
|
||||||
|
|
||||||
use OCA\DAV\Connector\Sabre\Directory;
|
use OCA\DAV\Connector\Sabre\Directory;
|
||||||
|
use OCP\Files\FileInfo;
|
||||||
use Sabre\DAV\Exception\Forbidden;
|
use Sabre\DAV\Exception\Forbidden;
|
||||||
use Sabre\HTTP\URLUtil;
|
use Sabre\HTTP\URLUtil;
|
||||||
|
|
||||||
|
@ -41,6 +42,9 @@ class FilesHome extends Directory {
|
||||||
$this->principalInfo = $principalInfo;
|
$this->principalInfo = $principalInfo;
|
||||||
$view = \OC\Files\Filesystem::getView();
|
$view = \OC\Files\Filesystem::getView();
|
||||||
$rootInfo = $view->getFileInfo('');
|
$rootInfo = $view->getFileInfo('');
|
||||||
|
if (!($rootInfo instanceof FileInfo)) {
|
||||||
|
throw new \Exception('Home does not exist');
|
||||||
|
}
|
||||||
parent::__construct($view, $rootInfo);
|
parent::__construct($view, $rootInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue