1
0
Fork 0
mirror of https://github.com/lrsjng/h5ai synced 2025-12-06 17:02:26 +01:00
This commit is contained in:
Fuan 2021-01-24 18:11:50 +01:00 committed by GitHub
commit c6f463bbdc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -189,7 +189,7 @@ class Context {
$folder = Item::get($this, $this->to_path($href), $cache);
// add content of subfolders
if ($what >= 2 && $folder !== null) {
if ($what >= 3 && $folder !== null) {
foreach ($folder->get_content($cache) as $item) {
$item->get_content($cache);
}
@ -197,11 +197,16 @@ class Context {
}
// add content of this folder and all parent folders
while ($what >= 1 && $folder !== null) {
while ($what >= 2 && $folder !== null) {
$folder->get_content($cache);
$folder = $folder->get_parent($cache);
}
// only add the requested folder (less fstat overhead)
if ($what == 1 && $folder !== null) {
$folder->get_content($cache);
}
uasort($cache, ['Item', 'cmp']);
$result = [];
foreach ($cache as $p => $item) {