perf(files): Only request directories from the database

Signed-off-by: Carl Schwan <carlschwan@kde.org>
This commit is contained in:
Carl Schwan 2026-02-12 01:29:25 +01:00 committed by Ferdinand Thiessen
parent 95d7b5608b
commit 0e66ed2233
No known key found for this signature in database
GPG key ID: 7E849AE05218500F

View file

@ -287,7 +287,7 @@ class ApiController extends Controller {
*/
private function getParents(Folder $currentFolder, string $root, array $children): array {
$parentFolder = $currentFolder->getParent();
$parentContent = array_filter($parentFolder->getDirectoryListing(), fn (Node $node) => $node instanceof Folder);
$parentContent = $parentFolder->getDirectoryListing('httpd/unix-directory');
$parentData = array_map(fn (Folder $node) => [
'id' => $node->getId(),
'basename' => basename($node->getPath()),