diff --git a/lib/app.php b/lib/app.php index 61566ed752..d1f12594a2 100755 --- a/lib/app.php +++ b/lib/app.php @@ -350,9 +350,13 @@ class OC_App{ protected static function findAppInDirectories($appid) { + static $app_dir = array(); + if (isset($app_dir[$appid])) { + return $app_dir[$appid]; + } foreach(OC::$APPSROOTS as $dir) { if(file_exists($dir['path'].'/'.$appid)) { - return $dir; + return $app_dir[$appid]=$dir; } } }