Register valid root for all installed apps in console

We need to use commands from apps that aren't enabled (so don't get loaded).
This commit is contained in:
Robin McCorkell 2015-09-14 16:58:25 +01:00
parent 4a777d686b
commit dad56921ae
1 changed files with 3 additions and 1 deletions

View File

@ -55,7 +55,9 @@ class Application {
if (!\OCP\Util::needUpgrade()) {
OC_App::loadApps();
foreach (\OC::$server->getAppManager()->getInstalledApps() as $app) {
$file = OC_App::getAppPath($app) . '/appinfo/register_command.php';
$appPath = \OC_App::getAppPath($app);
\OC::$loader->addValidRoot($appPath);
$file = $appPath . '/appinfo/register_command.php';
if (file_exists($file)) {
require $file;
}