Skip to content

Commit

Permalink
Only if the files system is properly setup FileHome can properly be i…
Browse files Browse the repository at this point in the history
…nitialized
  • Loading branch information
DeepDiver1975 committed Nov 11, 2019
1 parent 5503eb7 commit 7a76e64
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions apps/dav/lib/Files/RootCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,13 @@ public function getChildForPrincipal(array $principalInfo) {
// in the future this could be considered to be used for accessing shared files
return new SimpleCollection($name);
}
$view = \OC\Files\Filesystem::getView();
$home = new FilesHome($principalInfo);
$rootInfo = $view->getFileInfo('');
$rootNode = new Directory($view, $rootInfo, $home);
$home->init($rootNode, $view, \OC::$server->getMountManager());
$view = \OC\Files\Filesystem::getView();
if ($view) {
$rootInfo = $view->getFileInfo('');
$rootNode = new Directory($view, $rootInfo, $home);
$home->init($rootNode, $view, \OC::$server->getMountManager());
}

return $home;
}
Expand Down

0 comments on commit 7a76e64

Please sign in to comment.