fix: widen bounded collection discovery scan

This commit is contained in:
Mikei386
2026-08-24 12:01:09 +02:00
parent a5cee5e98f
commit 2a20426cab
3 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -266,7 +266,10 @@ function files_inventory(
$queue = [[$root, '', 0]];
$entries = [];
$scanned = 0;
$max_scanned = max(1000, min(100000, $max_entries * 50));
// Discovery often needs to inspect many names while returning only a few
// matching directories. Keep the scan bounded, but do not tie it too
// tightly to the small result limit chosen for directory discovery.
$max_scanned = max(25000, min(250000, $max_entries * 100));
$truncated = false;
while ($queue) {