handle single file dav endpoints

This commit is contained in:
Robin Appelman 2015-08-11 14:46:46 +02:00
parent fd35365041
commit b7cbff23d9
1 changed files with 6 additions and 2 deletions

View File

@ -78,8 +78,12 @@ class ServerFactory {
$rootInfo = $view->getFileInfo('');
// Create ownCloud Dir
$rootDir = new \OC\Connector\Sabre\Directory($view, $rootInfo);
$objectTree->init($rootDir, $view, $this->mountManager);
if ($rootInfo->getType() === 'dir') {
$root = new \OC\Connector\Sabre\Directory($view, $rootInfo);
} else {
$root = new \OC\Connector\Sabre\File($view, $rootInfo);
}
$objectTree->init($root, $view, $this->mountManager);
$server->addPlugin(new \OC\Connector\Sabre\QuotaPlugin($view));