diff options
Diffstat (limited to 'lib/private/files/config/usermountcache.php')
-rw-r--r-- | lib/private/files/config/usermountcache.php | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/private/files/config/usermountcache.php b/lib/private/files/config/usermountcache.php index 78b19972787..05ca146f4be 100644 --- a/lib/private/files/config/usermountcache.php +++ b/lib/private/files/config/usermountcache.php @@ -80,18 +80,11 @@ class UserMountCache implements IUserMountCache { }); /** @var ICachedMountInfo[] $newMounts */ $newMounts = array_map(function (IMountPoint $mount) use ($user) { - $storage = $mount->getStorage(); - if ($storage->instanceOfStorage('\OC\Files\Storage\Shared')) { - $rootId = (int)$storage->getShare()['file_source']; - } else { - $rootId = (int)$storage->getCache()->getId(''); - } - $storageId = (int)$storage->getStorageCache()->getNumericId(); // filter out any storages which aren't scanned yet since we aren't interested in files from those storages (yet) - if ($rootId === -1) { + if ($mount->getStorageRootId() === -1) { return null; } else { - return new CachedMountInfo($user, $storageId, $rootId, $mount->getMountPoint()); + return new LazyStorageMountInfo($user, $mount); } }, $mounts); $newMounts = array_values(array_filter($newMounts)); |