diff options
Diffstat (limited to 'lib/private/Installer.php')
-rw-r--r-- | lib/private/Installer.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/Installer.php b/lib/private/Installer.php index 6aaa6fe6ac3..67c949bc135 100644 --- a/lib/private/Installer.php +++ b/lib/private/Installer.php @@ -91,7 +91,12 @@ class Installer { * @return integer */ public function installApp($appId) { - $basedir = OC_App::getInstallPath().'/'.$appId; + $app = \OC_App::findAppInDirectories($appId); + if($app === false) { + throw new \Exception('App not found in any app directory'); + } + + $basedir = $app['path'].'/'.$appId; $info = OC_App::getAppInfo($basedir.'/appinfo/info.xml', true); //install the database |