fix(files): Fix incorrect keys by reindexing

Signed-off-by: Christopher Ng <chrng8@gmail.com>
pull/46596/head
Christopher Ng 2024-07-30 18:19:55 +07:00
parent f645c9bd74
commit 572361f498
1 changed files with 2 additions and 2 deletions

@ -222,9 +222,9 @@ class Folder extends Node implements \OCP\Files\Folder {
}, array_values($resultsPerCache), array_keys($resultsPerCache)));
// don't include this folder in the results
$files = array_filter($files, function (FileInfo $file) {
$files = array_values(array_filter($files, function (FileInfo $file) {
return $file->getPath() !== $this->getPath();
});
}));
// since results were returned per-cache, they are no longer fully sorted
$order = $query->getOrder();