diff --git a/app/Bootstrap/FinderComposer.php b/app/Bootstrap/FinderComposer.php index 461b480..c06f352 100644 --- a/app/Bootstrap/FinderComposer.php +++ b/app/Bootstrap/FinderComposer.php @@ -50,7 +50,7 @@ class FinderComposer */ public function __invoke(): void { - $finder = Finder::create()->depth(0)->followLinks(); + $finder = Finder::create()->followLinks(); $finder->ignoreVCS($this->config->get('app.hide_vcs_files', false)); $finder->filter(function (SplFileInfo $file) { return ! $this->hiddenFiles()->contains($file->getRealPath()); diff --git a/app/Controllers/DirectoryController.php b/app/Controllers/DirectoryController.php index 8acb9d9..81b9172 100644 --- a/app/Controllers/DirectoryController.php +++ b/app/Controllers/DirectoryController.php @@ -47,7 +47,7 @@ class DirectoryController public function __invoke(Finder $files, Response $response, string $path = '.') { try { - $files = $files->in($path); + $files = $files->in($path)->depth(0); } catch (DirectoryNotFoundException $exception) { return $this->view->render($response->withStatus(404), '404.twig'); }