| @@ 228-232 (lines=5) @@ | ||
| 225 | throw new \Sabre\DAV\Exception\NotFound('File with name ' . $path . ' could not be located'); |
|
| 226 | } |
|
| 227 | ||
| 228 | if ($info['mimetype'] === 'httpd/unix-directory') { |
|
| 229 | $node = new \OCA\DAV\Connector\Sabre\Directory($this->fileView, $info, $this->tree, $this->shareManager); |
|
| 230 | } else { |
|
| 231 | $node = new \OCA\DAV\Connector\Sabre\File($this->fileView, $info, $this->shareManager); |
|
| 232 | } |
|
| 233 | if ($this->tree) { |
|
| 234 | $this->tree->cacheNode($node); |
|
| 235 | } |
|
| @@ 162-166 (lines=5) @@ | ||
| 159 | ||
| 160 | /** @var SearchResult[] $nodes */ |
|
| 161 | $nodes = array_map(function (Node $node) { |
|
| 162 | if ($node instanceof Folder) { |
|
| 163 | $davNode = new \OCA\DAV\Connector\Sabre\Directory($this->view, $node, $this->tree, $this->shareManager); |
|
| 164 | } else { |
|
| 165 | $davNode = new \OCA\DAV\Connector\Sabre\File($this->view, $node, $this->shareManager); |
|
| 166 | } |
|
| 167 | $path = $this->getHrefForNode($node); |
|
| 168 | $this->tree->cacheNode($davNode, $path); |
|
| 169 | return new SearchResult($davNode, $path); |
|