diff --git a/lib/private/Route/Router.php b/lib/private/Route/Router.php index 28a25b4addf93..06c1253e570cd 100644 --- a/lib/private/Route/Router.php +++ b/lib/private/Route/Router.php @@ -147,6 +147,9 @@ public function loadRoutes($app = null) { if (isset($this->loadedApps[$app])) { return; } + if (!in_array($app, \OC_App::getEnabledApps())) { + return; + } $appPath = \OC_App::getAppPath($app); $file = $appPath . '/appinfo/routes.php'; if ($appPath !== false && file_exists($file)) {