$cachedMounts = $this->getMountsForUser($user);
if (is_array($mountProviderClasses)) {
- $cachedMounts = array_filter($cachedMounts, function (ICachedMountInfo $mountInfo) use ($mountProviderClasses, $newMounts) {
+ $cachedMounts = array_filter($cachedMounts, function (ICachedMountInfo $mountInfo) use ($mountProviderClasses, $newMounts): bool {
// for existing mounts that didn't have a mount provider set
// we still want the ones that map to new mounts
if ($mountInfo->getMountProvider() === '' && isset($newMounts[$mountInfo->getKey()])) {
if (isset($params['validateWrites'])) {
$this->validateWrites = (bool)$params['validateWrites'];
}
+
+ // home storage is setup in the SetupManager
+ if (!$this instanceof HomeObjectStoreStorage) {
+ //initialize cache with root directory in cache
+ if (!$this->is_dir('/')) {
+ $this->mkdir('/');
+ }
+ }
$this->handleCopiesAsOwned = (bool)($params['handleCopiesAsOwned'] ?? false);
$this->logger = \OCP\Server::get(LoggerInterface::class);
if ($homeMount->getStorageRootId() === -1) {
$this->eventLogger->start('fs:setup:user:home:scan', 'Scan home filesystem for user');
- $homeMount->getStorage()->mkdir('');
- $homeMount->getStorage()->getScanner()->scan('');
+ $homeStorage = $homeMount->getStorage();
+ $homeStorage->mkdir('');
+ $homeStorage->mkdir('files');
+ $homeStorage->getScanner()->scan('');
$this->eventLogger->end('fs:setup:user:home:scan');
}