Allow major/minor match for owncloud version

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2020-09-25 12:04:11 +02:00
parent f5501ca276
commit 2607ac3fb2
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
1 changed files with 4 additions and 1 deletions

View File

@ -192,7 +192,10 @@ class Updater extends BasicEmitter {
$currentVendor = $this->config->getAppValue('core', 'vendor', ''); $currentVendor = $this->config->getAppValue('core', 'vendor', '');
// Vendor was not set correctly on install, so we have to white-list known versions // Vendor was not set correctly on install, so we have to white-list known versions
if ($currentVendor === '' && isset($allowedPreviousVersions['owncloud'][$oldVersion])) { if ($currentVendor === '' && (
isset($allowedPreviousVersions['owncloud'][$oldVersion]) ||
isset($allowedPreviousVersions['owncloud'][$majorMinor])
)) {
$currentVendor = 'owncloud'; $currentVendor = 'owncloud';
} }