Skip to content

Commit

Permalink
Merge pull request #36401 from owncloud/bugfix/files-root-collection-…
Browse files Browse the repository at this point in the history
…fs-not-setup

Only if the files system is properly setup FileHome can properly be i…
  • Loading branch information
micbar authored Nov 25, 2019
2 parents b36724f + efa2282 commit a72ed55
Show file tree
Hide file tree
Showing 2 changed files with 11 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
5 changes: 5 additions & 0 deletions changelog/unreleased/36401
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: handling null properly in dav files endpoint

Only if the files system is properly setup FileHome can properly be initialized

https://github.com/owncloud/core/pull/36401

0 comments on commit a72ed55

Please sign in to comment.