| @@ 273-287 (lines=15) @@ | ||
| 270 | $mounts = array_reverse($mounts); |
|
| 271 | ||
| 272 | $nodes = array(); |
|
| 273 | foreach ($mounts as $mount) { |
|
| 274 | /** |
|
| 275 | * @var \OC\Files\Mount\MountPoint $mount |
|
| 276 | */ |
|
| 277 | if ($mount->getStorage()) { |
|
| 278 | $cache = $mount->getStorage()->getCache(); |
|
| 279 | $internalPath = $cache->getPathById($id); |
|
| 280 | if (is_string($internalPath)) { |
|
| 281 | $fullPath = $mount->getMountPoint() . $internalPath; |
|
| 282 | if (!is_null($path = $this->getRelativePath($fullPath))) { |
|
| 283 | $nodes[] = $this->get($path); |
|
| 284 | } |
|
| 285 | } |
|
| 286 | } |
|
| 287 | } |
|
| 288 | return $nodes; |
|
| 289 | } |
|
| 290 | ||
| @@ 1579-1593 (lines=15) @@ | ||
| 1576 | // reverse the array so we start with the storage this view is in |
|
| 1577 | // which is the most likely to contain the file we're looking for |
|
| 1578 | $mounts = array_reverse($mounts); |
|
| 1579 | foreach ($mounts as $mount) { |
|
| 1580 | /** |
|
| 1581 | * @var \OC\Files\Mount\MountPoint $mount |
|
| 1582 | */ |
|
| 1583 | if ($mount->getStorage()) { |
|
| 1584 | $cache = $mount->getStorage()->getCache(); |
|
| 1585 | $internalPath = $cache->getPathById($id); |
|
| 1586 | if (is_string($internalPath)) { |
|
| 1587 | $fullPath = $mount->getMountPoint() . $internalPath; |
|
| 1588 | if (!is_null($path = $this->getRelativePath($fullPath))) { |
|
| 1589 | return $path; |
|
| 1590 | } |
|
| 1591 | } |
|
| 1592 | } |
|
| 1593 | } |
|
| 1594 | return null; |
|
| 1595 | } |
|
| 1596 | ||