summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-06-22 14:41:08 +0200
committerRobin Appelman <icewind@owncloud.com>2015-06-29 14:06:29 +0200
commit786ec82a619abfc330bb0ff0d8db3398cb1bba01 (patch)
treecdaf92335b8de8e19adc12ed67a1d9388e89f0e0 /lib/private
parent8ec7e9fac7d16d60da09689f6a92dbdfed89c53b (diff)
downloadnextcloud-server-786ec82a619abfc330bb0ff0d8db3398cb1bba01.tar.gz
nextcloud-server-786ec82a619abfc330bb0ff0d8db3398cb1bba01.zip
add unit test
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/files/config/mountprovidercollection.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/private/files/config/mountprovidercollection.php b/lib/private/files/config/mountprovidercollection.php
index a14a6ef796f..7db0aff44e7 100644
--- a/lib/private/files/config/mountprovidercollection.php
+++ b/lib/private/files/config/mountprovidercollection.php
@@ -57,8 +57,11 @@ class MountProviderCollection implements IMountProviderCollection, Emitter {
*/
public function getMountsForUser(IUser $user) {
$loader = $this->loader;
- return array_reduce($this->providers, function ($mounts, IMountProvider $provider) use ($user, $loader) {
- return array_merge($mounts, $provider->getMountsForUser($user, $loader));
+ $mounts = array_map(function (IMountProvider $provider) use ($user, $loader) {
+ return $provider->getMountsForUser($user, $loader);
+ }, $this->providers);
+ return array_reduce($mounts, function ($mounts, $providerMounts) {
+ return array_merge($mounts, $providerMounts);
}, array());
}