summaryrefslogtreecommitdiffstats
path: root/lib/private/Installer.php
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2016-10-31 17:30:02 +0100
committerLukas Reschke <lukas@statuscode.ch>2016-10-31 17:30:02 +0100
commitd805df7bb3275b33b53c4591499be0cf68f0a38a (patch)
tree8d0d3ed70eda941d39c3c2455cc2f44cd1ad049a /lib/private/Installer.php
parenta68595742b4a5e13f27bc5cc9d4bbd79044e1790 (diff)
downloadnextcloud-server-d805df7bb3275b33b53c4591499be0cf68f0a38a.tar.gz
nextcloud-server-d805df7bb3275b33b53c4591499be0cf68f0a38a.zip
Use findAppInDirectories
The other function doesn't work if the appstore is disabled Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'lib/private/Installer.php')
-rw-r--r--lib/private/Installer.php7
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