summaryrefslogtreecommitdiffstats
path: root/lib/private/files/storage/home.php
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-11-12 15:46:01 +0100
committerVincent Petry <pvince81@owncloud.com>2013-11-12 18:01:02 +0100
commit34c92f665639baf6ea86a265855a2b2862755537 (patch)
treec8cc2b73f2cee74a449593673bf4213dbb4e81e7 /lib/private/files/storage/home.php
parent1a65e3a72593a2eb343386e5008faea78f0b9c8f (diff)
downloadnextcloud-server-34c92f665639baf6ea86a265855a2b2862755537.tar.gz
nextcloud-server-34c92f665639baf6ea86a265855a2b2862755537.zip
Now using HomeStorage for legacy home storage ids
Legacy home storage ids with the format "local://path/to/datadir/user1" are now also wrapped by the HomeStorage.
Diffstat (limited to 'lib/private/files/storage/home.php')
-rw-r--r--lib/private/files/storage/home.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/private/files/storage/home.php b/lib/private/files/storage/home.php
index 22753519ad3..b4ceb8f4f9b 100644
--- a/lib/private/files/storage/home.php
+++ b/lib/private/files/storage/home.php
@@ -13,6 +13,11 @@ namespace OC\Files\Storage;
*/
class Home extends Local {
/**
+ * @var string
+ */
+ protected $id;
+
+ /**
* @var \OC\User\User $user
*/
protected $user;
@@ -20,12 +25,19 @@ class Home extends Local {
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();
+ }
parent::__construct(array('datadir' => $datadir));
}
public function getId() {
- return 'home::' . $this->user->getUID();
+ return $this->id;
}
public function getCache($path = '') {