Skip to content

Commit 625ed52

Browse files
committed
fix user folder init
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 parent 34426c8 commit 625ed52

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

lib/private/Files/ObjectStore/ObjectStoreStorage.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,13 @@ public function __construct($params) {
7575
if (isset($params['objectPrefix'])) {
7676
$this->objectPrefix = $params['objectPrefix'];
7777
}
78-
//initialize cache with root directory in cache
79-
if (!$this->is_dir('/')) {
80-
$this->mkdir('/');
78+
79+
// home storage is setup in the SetupManager
80+
if (!$this instanceof HomeObjectStoreStorage) {
81+
//initialize cache with root directory in cache
82+
if (!$this->is_dir('/')) {
83+
$this->mkdir('/');
84+
}
8185
}
8286

8387
$this->logger = \OC::$server->getLogger();

lib/private/Files/SetupManager.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,10 @@ private function oneTimeUserSetup(IUser $user) {
239239
$this->mountManager->addMount($homeMount);
240240

241241
if ($homeMount->getStorageRootId() === -1) {
242-
$homeMount->getStorage()->mkdir('');
243-
$homeMount->getStorage()->getScanner()->scan('');
242+
$homeStorage = $homeMount->getStorage();
243+
$homeStorage->mkdir('');
244+
$homeStorage->mkdir('files');
245+
$homeStorage->getScanner()->scan('');
244246
}
245247

246248
$provider = $homeMount->getMountProvider();

0 commit comments

Comments
 (0)