summaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2016-08-27 22:44:29 +0200
committerGitHub <noreply@github.com>2016-08-27 22:44:29 +0200
commit4d85ffc27cab959b25c00426e334319495535bb9 (patch)
tree690e50739a02d69dd8fd5d994f88670524dde427 /apps/dav
parentccbbf61ed60dcff59208c756b0d77b6157925ac7 (diff)
parentfb88d668575562407edcaf392ec6f771cba55dba (diff)
downloadnextcloud-server-4d85ffc27cab959b25c00426e334319495535bb9.tar.gz
nextcloud-server-4d85ffc27cab959b25c00426e334319495535bb9.zip
Merge pull request #1054 from nextcloud/less-cache-hits
Reduce the number of cache operations for dav operations
Diffstat (limited to 'apps/dav')
-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') {