We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 403c33a commit 7fa3f89Copy full SHA for 7fa3f89
1 file changed
lib/private/Files/Node/Root.php
@@ -384,7 +384,7 @@ public function getFirstNodeByIdInPath(int $id, string $path): ?INode {
384
// scope the cache by user, so we don't return nodes for different users
385
if ($this->user) {
386
$cachedPath = $this->pathByIdCache->get($this->user->getUID() . '::' . $id);
387
- if ($cachedPath && str_starts_with($path, $cachedPath)) {
+ if ($cachedPath && str_starts_with($cachedPath, $path)) {
388
// getting the node by path is significantly cheaper than finding it by id
389
$node = $this->get($cachedPath);
390
// by validating that the cached path still has the requested fileid we can work around the need to invalidate the cached path
0 commit comments