diff options
Diffstat (limited to 'lib/private/files/storage/home.php')
-rw-r--r-- | lib/private/files/storage/home.php | 14 |
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 = '') { |