fix: reduce memory consumption of scans

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>

Fix lint

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
pull/41272/head
Git'Fellow 7 months ago
parent fbd8f76e42
commit b4a3773115

@ -599,9 +599,12 @@ class Cache implements ICache {
}
/** @var ICacheEntry[] $childFolders */
$childFolders = array_filter($children, function ($child) {
return $child->getMimeType() == FileInfo::MIMETYPE_FOLDER;
});
$childFolders = [];
foreach ($children as $child) {
if ($child->getMimeType() == FileInfo::MIMETYPE_FOLDER) {
$childFolders[] = $child;
}
}
foreach ($childFolders as $folder) {
$parentIds[] = $folder->getId();
$queue[] = $folder->getId();

Loading…
Cancel
Save