summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/MountProvider.php
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2018-08-16 19:16:24 +0200
committerRobin Appelman <robin@icewind.nl>2018-08-16 19:54:42 +0200
commit3155c1bd9a40cf0b77e392cf7bc9fad353c820ce (patch)
tree646f0832de5ca0ff3d1e4b4e1ee15f8c0085e07c /apps/files_sharing/lib/MountProvider.php
parentf7ae235372ee5647003c407dff7eca83cb7a1322 (diff)
downloadnextcloud-server-3155c1bd9a40cf0b77e392cf7bc9fad353c820ce.tar.gz
nextcloud-server-3155c1bd9a40cf0b77e392cf7bc9fad353c820ce.zip
more efficient unique share target generation
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_sharing/lib/MountProvider.php')
-rw-r--r--apps/files_sharing/lib/MountProvider.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/MountProvider.php b/apps/files_sharing/lib/MountProvider.php
index cb02a2b5f23..f2fc45dae4e 100644
--- a/apps/files_sharing/lib/MountProvider.php
+++ b/apps/files_sharing/lib/MountProvider.php
@@ -86,7 +86,7 @@ class MountProvider implements IMountProvider {
$mounts = [];
foreach ($superShares as $share) {
try {
- $mounts[] = new SharedMount(
+ $mount = new SharedMount(
'\OCA\Files_Sharing\SharedStorage',
$mounts,
[
@@ -98,6 +98,7 @@ class MountProvider implements IMountProvider {
],
$storageFactory
);
+ $mounts[$mount->getMountPoint()] = $mount;
} catch (\Exception $e) {
$this->logger->logException($e);
$this->logger->error('Error while trying to create shared mount');
@@ -105,7 +106,7 @@ class MountProvider implements IMountProvider {
}
// array_filter removes the null values from the array
- return array_filter($mounts);
+ return array_values(array_filter($mounts));
}
/**