summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Connector
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2016-08-25 15:48:53 +0200
committerRobin Appelman <robin@icewind.nl>2016-08-25 17:22:22 +0200
commit7c4d9add0d98091d8dc932553f84f9c00a906389 (patch)
tree3807dc07b5afdff8be7e14e6f41b36509e3e42fb /apps/dav/lib/Connector
parent1c3b1e5797da8a7a398a59a353e1616ba518fc59 (diff)
downloadnextcloud-server-7c4d9add0d98091d8dc932553f84f9c00a906389.tar.gz
nextcloud-server-7c4d9add0d98091d8dc932553f84f9c00a906389.zip
reuse the userfolder's fileinfo when possible during dav setup
Diffstat (limited to 'apps/dav/lib/Connector')
-rw-r--r--apps/dav/lib/Connector/Sabre/ServerFactory.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/dav/lib/Connector/Sabre/ServerFactory.php b/apps/dav/lib/Connector/Sabre/ServerFactory.php
index 55b967619d6..644f0f28f57 100644
--- a/apps/dav/lib/Connector/Sabre/ServerFactory.php
+++ b/apps/dav/lib/Connector/Sabre/ServerFactory.php
@@ -29,6 +29,7 @@
namespace OCA\DAV\Connector\Sabre;
+use OC\Files\Node\Folder;
use OCA\DAV\Files\BrowserErrorPagePlugin;
use OCP\Files\Mount\IMountManager;
use OCP\IConfig;
@@ -135,7 +136,11 @@ class ServerFactory {
/** @var \OC\Files\View $view */
$view = $viewCallBack($server);
- $rootInfo = $view->getFileInfo('');
+ if ($userFolder instanceof Folder && $userFolder->getPath() === $view->getRoot()) {
+ $rootInfo = $userFolder;
+ } else {
+ $rootInfo = $view->getFileInfo('');
+ }
// Create ownCloud Dir
if ($rootInfo->getType() === 'dir') {