Get correct version of an app

Related to #8929

We should get the version of the app. Not of the appfolder. Else there
is no way to properly compare the versions.

Now note that installing in 1 go will still fail. But at least on the
next page load the new version will be properly detected.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2018-05-03 08:22:03 +02:00
parent 2aa108000c
commit f7b518fdbf
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 1 additions and 1 deletions

View File

@ -464,7 +464,7 @@ class OC_App {
} else {
$versionToLoad = [];
foreach ($possibleApps as $possibleApp) {
$version = self::getAppVersionByPath($possibleApp['path']);
$version = self::getAppVersionByPath($possibleApp['path'] . '/' . $appId);
if (empty($versionToLoad) || version_compare($version, $versionToLoad['version'], '>')) {
$versionToLoad = array(
'dir' => $possibleApp,