diff --git a/src/think/console/command/RouteList.php b/src/think/console/command/RouteList.php index 546cf4d9ea..ac78b45de0 100644 --- a/src/think/console/command/RouteList.php +++ b/src/think/console/command/RouteList.php @@ -60,7 +60,7 @@ protected function getRouteList(string $dir = null): string $this->app->route->lazy(false); if ($dir) { - $path = $this->app->getRootPath() . 'route' . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR; + $path = $this->app->getAppPath() . $dir . DIRECTORY_SEPARATOR . 'route' . DIRECTORY_SEPARATOR; } else { $path = $this->app->getRootPath() . 'route' . DIRECTORY_SEPARATOR; }