summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/connector/sabre/directory.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib/connector/sabre/directory.php')
-rw-r--r--apps/dav/lib/connector/sabre/directory.php22
1 files changed, 21 insertions, 1 deletions
diff --git a/apps/dav/lib/connector/sabre/directory.php b/apps/dav/lib/connector/sabre/directory.php
index 59e2ef3d2ec..0119879a171 100644
--- a/apps/dav/lib/connector/sabre/directory.php
+++ b/apps/dav/lib/connector/sabre/directory.php
@@ -54,6 +54,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
*
* Data will either be supplied as a stream resource, or in certain cases
@@ -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;
}