]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use fixed preview buckets that are postfixed with -preview-NUMBER
authorMorris Jobke <hey@morrisjobke.de>
Thu, 6 Aug 2020 12:00:51 +0000 (14:00 +0200)
committerMorris Jobke <hey@morrisjobke.de>
Thu, 6 Aug 2020 20:19:21 +0000 (22:19 +0200)
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
lib/private/Files/Mount/ObjectStorePreviewCacheMountProvider.php

index 9ab0327684b8768a838c7f136f42230f1632c437..dba1dfc28e536204061539ae9cc3bf299e3c6be3 100644 (file)
@@ -108,8 +108,8 @@ class ObjectStorePreviewCacheMountProvider implements IRootMountProvider {
                if (!isset($config['arguments']['bucket'])) {
                        $config['arguments']['bucket'] = '';
                }
-               $numBuckets = isset($config['arguments']['num_buckets']) ? $config['arguments']['num_buckets'] : 64;
-               $config['arguments']['bucket'] .= (string)($number % $numBuckets);
+
+               $config['arguments']['bucket'] .= "-preview-$number";
 
                // instantiate object store implementation
                $config['arguments']['objectstore'] = new $config['class']($config['arguments']);