diff --git a/apps/dav/lib/connector/sabre/directory.php b/apps/dav/lib/connector/sabre/directory.php
index 59e2ef3d2ec56bfe8d21b43270578984965c278c..0119879a171d6d3b288d4bc5352cadf6d954de17 100644
--- a/apps/dav/lib/connector/sabre/directory.php
+++ b/apps/dav/lib/connector/sabre/directory.php
@@ -53,6 +53,23 @@ class Directory extends \OCA\DAV\Connector\Sabre\Node
 	 */
 	private $quotaInfo;
 
+	/**
+	 * @var ObjectTree|null
+	 */
+	private $tree;
+
+	/**
+	 * Sets up the node, expects a full path name
+	 *
+	 * @param \OC\Files\View $view
+	 * @param \OCP\Files\FileInfo $info
+	 * @param ObjectTree|null $tree
+	 */
+	public function __construct($view, $info, $tree = null) {
+		parent::__construct($view, $info);
+		$this->tree = $tree;
+	}
+
 	/**
 	 * Creates a new file in the directory
 	 *
@@ -185,10 +202,13 @@ class Directory extends \OCA\DAV\Connector\Sabre\Node
 		}
 
 		if ($info['mimetype'] == 'httpd/unix-directory') {
-			$node = new \OCA\DAV\Connector\Sabre\Directory($this->fileView, $info);
+			$node = new \OCA\DAV\Connector\Sabre\Directory($this->fileView, $info, $this->tree);
 		} else {
 			$node = new \OCA\DAV\Connector\Sabre\File($this->fileView, $info);
 		}
+		if ($this->tree) {
+			$this->tree->cacheNode($node);
+		}
 		return $node;
 	}
 
diff --git a/apps/dav/lib/connector/sabre/objecttree.php b/apps/dav/lib/connector/sabre/objecttree.php
index 55b310a44052faa1029d574254a01c23dbcef5d5..a1796136c4e62b7516fb7d920a7bb937d80164bc 100644
--- a/apps/dav/lib/connector/sabre/objecttree.php
+++ b/apps/dav/lib/connector/sabre/objecttree.php
@@ -94,6 +94,10 @@ class ObjectTree extends \Sabre\DAV\Tree {
 		return $path;
 	}
 
+	public function cacheNode(Node $node) {
+		$this->cache[trim($node->getPath(), '/')] = $node;
+	}
+
 	/**
 	 * Returns the INode object for the requested path
 	 *
@@ -108,6 +112,11 @@ class ObjectTree extends \Sabre\DAV\Tree {
 		}
 
 		$path = trim($path, '/');
+
+		if (isset($this->cache[$path])) {
+			return $this->cache[$path];
+		}
+
 		if ($path) {
 			try {
 				$this->fileView->verifyPath($path, basename($path));
@@ -116,10 +125,6 @@ class ObjectTree extends \Sabre\DAV\Tree {
 			}
 		}
 
-		if (isset($this->cache[$path])) {
-			return $this->cache[$path];
-		}
-
 		// Is it the root node?
 		if (!strlen($path)) {
 			return $this->rootNode;
@@ -162,7 +167,7 @@ class ObjectTree extends \Sabre\DAV\Tree {
 		}
 
 		if ($info->getType() === 'dir') {
-			$node = new \OCA\DAV\Connector\Sabre\Directory($this->fileView, $info);
+			$node = new \OCA\DAV\Connector\Sabre\Directory($this->fileView, $info, $this);
 		} else {
 			$node = new \OCA\DAV\Connector\Sabre\File($this->fileView, $info);
 		}
diff --git a/apps/dav/lib/connector/sabre/serverfactory.php b/apps/dav/lib/connector/sabre/serverfactory.php
index 88e7e9a545fe37663bbd550d388520b357b8da23..92038c18724fd737a6cb7ce53eacaf89e12b09e1 100644
--- a/apps/dav/lib/connector/sabre/serverfactory.php
+++ b/apps/dav/lib/connector/sabre/serverfactory.php
@@ -120,7 +120,7 @@ class ServerFactory {
 
 			// Create ownCloud Dir
 			if ($rootInfo->getType() === 'dir') {
-				$root = new \OCA\DAV\Connector\Sabre\Directory($view, $rootInfo);
+				$root = new \OCA\DAV\Connector\Sabre\Directory($view, $rootInfo, $objectTree);
 			} else {
 				$root = new \OCA\DAV\Connector\Sabre\File($view, $rootInfo);
 			}