From 17031f4a6627bc45123acb2024e912548c12b379 Mon Sep 17 00:00:00 2001 From: "John Paul E. Balandan, CPA" Date: Sat, 25 Apr 2026 18:43:37 +0800 Subject: [PATCH] refactor: simplify FileLocator::listFiles() --- system/Autoloader/FileLocator.php | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/system/Autoloader/FileLocator.php b/system/Autoloader/FileLocator.php index f67708a4e836..50015b5b7341 100644 --- a/system/Autoloader/FileLocator.php +++ b/system/Autoloader/FileLocator.php @@ -330,19 +330,7 @@ public function listFiles(string $path): array helper('filesystem'); foreach ($this->getNamespaces() as $namespace) { - $fullPath = $namespace['path'] . $path; - $resolvedPath = realpath($fullPath); - $fullPath = $resolvedPath !== false ? $resolvedPath : $fullPath; - - if (! is_dir($fullPath)) { - continue; - } - - $tempFiles = get_filenames($fullPath, true, false, false); - - if ($tempFiles !== []) { - $files = array_merge($files, $tempFiles); - } + $files = array_merge($files, get_filenames($namespace['path'] . $path, true, false, false)); } return $files;