From 4744dce4dffdbfa1817d89b07ec7dc53f99b522c Mon Sep 17 00:00:00 2001 From: Vincent Petry <pvince81@owncloud.com> Date: Wed, 21 Dec 2016 11:10:14 +0100 Subject: [PATCH] Nuke the legacy storage fallback from orbit Signed-off-by: Lukas Reschke <lukas@statuscode.ch> --- lib/private/Files/Mount/LocalHomeMountProvider.php | 3 --- lib/private/Files/Storage/Home.php | 11 ++--------- tests/lib/Files/Storage/HomeTest.php | 8 -------- 3 files changed, 2 insertions(+), 20 deletions(-) diff --git a/lib/private/Files/Mount/LocalHomeMountProvider.php b/lib/private/Files/Mount/LocalHomeMountProvider.php index 23bbfcd5ffa..9057f62995f 100644 --- a/lib/private/Files/Mount/LocalHomeMountProvider.php +++ b/lib/private/Files/Mount/LocalHomeMountProvider.php @@ -39,9 +39,6 @@ class LocalHomeMountProvider implements IHomeMountProvider { */ public function getHomeMountForUser(IUser $user, IStorageFactory $loader) { $arguments = ['user' => $user]; - if (\OC\Files\Cache\Storage::exists('local::' . $user->getHome() . '/')) { - $arguments['legacy'] = true; - } return new MountPoint('\OC\Files\Storage\Home', '/' . $user->getUID(), $arguments, $loader); } } diff --git a/lib/private/Files/Storage/Home.php b/lib/private/Files/Storage/Home.php index e5ba0f9dfe4..57b32349324 100644 --- a/lib/private/Files/Storage/Home.php +++ b/lib/private/Files/Storage/Home.php @@ -44,19 +44,12 @@ class Home extends Local implements \OCP\Files\IHomeStorage { /** * Construct a Home storage instance * @param array $arguments array with "user" containing the - * storage owner and "legacy" containing "true" if the storage is - * a legacy storage with "local::" URL instead of the new "home::" one. + * storage owner */ public function __construct($arguments) { $this->user = $arguments['user']; $datadir = $this->user->getHome(); - if (isset($arguments['legacy']) && $arguments['legacy']) { - // legacy home id (<= 5.0.12) - $this->id = 'local::' . $datadir . '/'; - } - else { - $this->id = 'home::' . $this->user->getUID(); - } + $this->id = 'home::' . $this->user->getUID(); parent::__construct(array('datadir' => $datadir)); } diff --git a/tests/lib/Files/Storage/HomeTest.php b/tests/lib/Files/Storage/HomeTest.php index d9a1b11849e..e6899ff7d38 100644 --- a/tests/lib/Files/Storage/HomeTest.php +++ b/tests/lib/Files/Storage/HomeTest.php @@ -88,14 +88,6 @@ class HomeTest extends Storage { $this->assertEquals('home::' . $this->userId, $this->instance->getId()); } - /** - * Tests that the legacy home id is in the format local::/path/to/datadir/user1/ - */ - public function testLegacyId() { - $this->instance = new \OC\Files\Storage\Home(array('user' => $this->user, 'legacy' => true)); - $this->assertEquals('local::' . $this->tmpDir . '/', $this->instance->getId()); - } - /** * Tests that getCache() returns an instance of HomeCache */ -- GitLab