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;