]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix: expect interface, not a specific implementation
authorArthur Schiwon <blizzz@arthur-schiwon.de>
Fri, 2 Jun 2023 23:19:15 +0000 (01:19 +0200)
committerArthur Schiwon <blizzz@arthur-schiwon.de>
Wed, 21 Jun 2023 14:53:13 +0000 (16:53 +0200)
- fixes a regression when deleting folders while music app was enabled,
  for a LazyRoot was passed to this method.

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
lib/private/Files/Cache/QuerySearchHelper.php

index 30b3c7225ac00c4be99f8481d3db5584000534c3..52663213b162e496152f0a014807ecceca9a7300 100644 (file)
 namespace OC\Files\Cache;
 
 use OC\Files\Cache\Wrapper\CacheJail;
-use OC\Files\Node\Root;
 use OC\Files\Search\QueryOptimizer\QueryOptimizer;
 use OC\Files\Search\SearchBinaryOperator;
 use OC\SystemConfig;
 use OCP\DB\QueryBuilder\IQueryBuilder;
 use OCP\Files\Cache\ICache;
 use OCP\Files\Cache\ICacheEntry;
-use OCP\Files\Folder;
 use OCP\Files\IMimeTypeLoader;
+use OCP\Files\IRootFolder;
 use OCP\Files\Mount\IMountPoint;
 use OCP\Files\Search\ISearchBinaryOperator;
 use OCP\Files\Search\ISearchQuery;
@@ -198,7 +197,7 @@ class QuerySearchHelper {
        /**
         * @return array{array<string, ICache>, array<string, IMountPoint>}
         */
-       public function getCachesAndMountPointsForSearch(Root $root, string $path, bool $limitToHome = false): array {
+       public function getCachesAndMountPointsForSearch(IRootFolder $root, string $path, bool $limitToHome = false): array {
                $rootLength = strlen($path);
                $mount = $root->getMount($path);
                $storage = $mount->getStorage();