fix: prune matched media collection roots
This commit is contained in:
@@ -307,7 +307,13 @@ function files_inventory(
|
||||
break 2;
|
||||
}
|
||||
}
|
||||
if ($is_dir) $queue[] = [$full, $relative, $depth + 1];
|
||||
// A filtered discovery call is meant to locate collection roots.
|
||||
// Once a directory itself matches, return that root but do not also
|
||||
// flood the bounded result with matching descendants. A follow-up
|
||||
// call with this path and an empty filter inventories the collection.
|
||||
if ($is_dir && !($needle !== '' && $matches)) {
|
||||
$queue[] = [$full, $relative, $depth + 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user