diff options
author | Thomas Müller <DeepDiver1975@users.noreply.github.com> | 2016-04-20 20:37:27 +0200 |
---|---|---|
committer | Thomas Müller <DeepDiver1975@users.noreply.github.com> | 2016-04-20 20:37:27 +0200 |
commit | cd01c440a01744d666df275cb7941fa29d2283dd (patch) | |
tree | d09caccace60dcfcc42e9b00ae2d810ec29643cc /lib/private/files/config/usermountcache.php | |
parent | cdcabbd0b3f6209b2a312b30a84c381f125bcf68 (diff) | |
parent | b53d6598f10c97318fbf065369f5b097eb134e28 (diff) | |
download | nextcloud-server-cd01c440a01744d666df275cb7941fa29d2283dd.tar.gz nextcloud-server-cd01c440a01744d666df275cb7941fa29d2283dd.zip |
Merge pull request #23919 from owncloud/cyclyc-share-dep-example
SharedStorage to new sharing code + cleanup
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)); |