aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Mount
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2016-11-02 14:42:36 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2016-11-02 21:31:24 +0100
commit049bcae29ebf6106b33dd44f3be30e2a8486cd98 (patch)
treeb0f7f982d1d8d29ba932867a120db1cbeef10d86 /lib/private/Files/Mount
parentdada3ffb51ce9d941b15f1e3fdc1ce292acebb69 (diff)
downloadnextcloud-server-049bcae29ebf6106b33dd44f3be30e2a8486cd98.tar.gz
nextcloud-server-049bcae29ebf6106b33dd44f3be30e2a8486cd98.zip
Allow setting a maximun number of buckets for multibucket
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Files/Mount')
-rw-r--r--lib/private/Files/Mount/ObjectHomeMountProvider.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/Files/Mount/ObjectHomeMountProvider.php b/lib/private/Files/Mount/ObjectHomeMountProvider.php
index c1eea34a72e..87878562a42 100644
--- a/lib/private/Files/Mount/ObjectHomeMountProvider.php
+++ b/lib/private/Files/Mount/ObjectHomeMountProvider.php
@@ -121,7 +121,8 @@ class ObjectHomeMountProvider implements IHomeMountProvider {
$config['arguments']['bucket'] = '';
}
$mapper = new \OC\Files\ObjectStore\Mapper($user);
- $config['arguments']['bucket'] .= $mapper->getBucket();
+ $numBuckets = isset($config['arguments']['num_buckets']) ? $config['arguments']['num_buckets'] : 64;
+ $config['arguments']['bucket'] .= $mapper->getBucket($numBuckets);
$this->config->setUserValue($user->getUID(), 'homeobjectstore', 'bucket', $config['arguments']['bucket']);
} else {