fix: Make sure directories don't get overriden by entries in outline
This commit is contained in:
parent
58bafe31f9
commit
7c955c481b
|
@ -64,7 +64,6 @@ final class MainController extends AbstractController
|
||||||
foreach ($finder as $file) {
|
foreach ($finder as $file) {
|
||||||
$current = &$tree;
|
$current = &$tree;
|
||||||
|
|
||||||
// Dunno why it is undefined, it works
|
|
||||||
foreach (explode('/', $file->getRelativePath()) as $part) {
|
foreach (explode('/', $file->getRelativePath()) as $part) {
|
||||||
if ($part === '') break;
|
if ($part === '') break;
|
||||||
|
|
||||||
|
@ -74,7 +73,9 @@ final class MainController extends AbstractController
|
||||||
$current = &$current[$part];
|
$current = &$current[$part];
|
||||||
}
|
}
|
||||||
|
|
||||||
$current[$file->getFilenameWithoutExtension()] = [];
|
if (!isset($current[$file->getFilenameWithoutExtension()])) {
|
||||||
|
$current[$file->getFilenameWithoutExtension()] = [];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->render('main/index.html.twig', [
|
return $this->render('main/index.html.twig', [
|
||||||
|
|
Loading…
Reference in New Issue