From dd6c9cb03d8a81c242c34f3d3c2f79090b383779 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 17 May 2017 11:18:43 +0200 Subject: [PATCH] Allow migrating from ownCloud 10.0.0 Signed-off-by: Joas Schilling --- lib/private/Updater.php | 13 ++++++++++++- version.php | 1 + 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/private/Updater.php b/lib/private/Updater.php index 6f81e6175f..5ca493e0ed 100644 --- a/lib/private/Updater.php +++ b/lib/private/Updater.php @@ -190,6 +190,16 @@ class Updater extends BasicEmitter { $majorMinor = $version[0] . '.' . $version[1]; $currentVendor = $this->config->getAppValue('core', 'vendor', ''); + + // Vendor was not set correctly on install, so we have to white-list known versions + if ($currentVendor === '') { + if (in_array($oldVersion, [ + '10.0.0.12', + ], true)) { + $currentVendor = 'owncloud'; + } + } + if ($currentVendor === 'nextcloud') { return isset($allowedPreviousVersions[$currentVendor][$majorMinor]) && (version_compare($oldVersion, $newVersion, '<=') || @@ -197,7 +207,8 @@ class Updater extends BasicEmitter { } // Check if the instance can be migrated - return isset($allowedPreviousVersions[$currentVendor][$majorMinor]); + return isset($allowedPreviousVersions[$currentVendor][$majorMinor]) || + isset($allowedPreviousVersions[$currentVendor][$oldVersion]); } /** diff --git a/version.php b/version.php index 37e15f35e1..8673939044 100644 --- a/version.php +++ b/version.php @@ -37,6 +37,7 @@ $OC_VersionCanBeUpgradedFrom = [ '12.0' => true, ], 'owncloud' => [ + '10.0.0.12' => true, ], ];