From 42fb12ba06cc4b45d0afdac2f92433b1d246e8b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 28 Jun 2023 08:03:49 +0200 Subject: [PATCH 1/4] fix: Adapt NoopScanner to renamed ObjectStoreScanner MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/Mount/GroupFolderStorage.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Mount/GroupFolderStorage.php b/lib/Mount/GroupFolderStorage.php index 901360ce2..d95eba5f8 100644 --- a/lib/Mount/GroupFolderStorage.php +++ b/lib/Mount/GroupFolderStorage.php @@ -23,6 +23,7 @@ use OC\Files\Cache\Scanner; use OC\Files\ObjectStore\NoopScanner; +use OC\Files\ObjectStore\ObjectStoreScanner; use OC\Files\ObjectStore\ObjectStoreStorage; use OC\Files\Storage\Wrapper\Quota; use OCP\Files\Cache\ICacheEntry; @@ -76,7 +77,7 @@ public function getScanner($path = '', $storage = null) { $storage = $this; } if ($storage->instanceOfStorage(ObjectStoreStorage::class)) { - $storage->scanner = new NoopScanner($storage); + $storage->scanner = new ObjectStoreScanner($storage); } elseif (!isset($storage->scanner)) { $storage->scanner = new Scanner($storage); } From 57eaa8288ff8fcab45ddba26c8a519c3b5c0ee3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 28 Jun 2023 08:05:49 +0200 Subject: [PATCH 2/4] fix: Adapt to new Folder interface method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/Helper/LazyFolder.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Helper/LazyFolder.php b/lib/Helper/LazyFolder.php index 13ae2364f..ad4d0292b 100644 --- a/lib/Helper/LazyFolder.php +++ b/lib/Helper/LazyFolder.php @@ -159,6 +159,10 @@ public function searchByTag($tag, $userId) { return $this->__call(__FUNCTION__, func_get_args()); } + public function searchBySystemTag(string $tagName, string $userId, int $limit = 0, int $offset = 0) { + return $this->__call(__FUNCTION__, func_get_args()); + } + public function getById($id) { return $this->__call(__FUNCTION__, func_get_args()); } From 98eded83e23ff3ec6d448a2a9001764c2d8dd99b Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 28 Jun 2023 14:52:57 +0200 Subject: [PATCH 3/4] adjust stubs Signed-off-by: Robin Appelman --- tests/stub.phpstub | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/stub.phpstub b/tests/stub.phpstub index a68493644..6181930bd 100644 --- a/tests/stub.phpstub +++ b/tests/stub.phpstub @@ -415,7 +415,7 @@ namespace OC\Core\Command { namespace OC\Files\ObjectStore { use OC\Files\Cache\Scanner; - class NoopScanner extends Scanner {} + class ObjectStoreScanner extends Scanner {} } namespace Symfony\Component\Console\Helper { From 913013055625287469f6a4b93a82773f969930a6 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Thu, 29 Jun 2023 09:48:39 +0200 Subject: [PATCH 4/4] fix: Adapt NoopScanner to renamed ObjectStoreScanner in Scan.php Signed-off-by: Arthur Schiwon --- lib/Command/Scan.php | 4 ++-- lib/Mount/GroupFolderStorage.php | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/Command/Scan.php b/lib/Command/Scan.php index f5dc7e201..206c2458e 100644 --- a/lib/Command/Scan.php +++ b/lib/Command/Scan.php @@ -23,7 +23,7 @@ namespace OCA\GroupFolders\Command; -use OC\Files\ObjectStore\NoopScanner; +use OC\Files\ObjectStore\ObjectStoreScanner; use OCP\Constants; use Symfony\Component\Console\Helper\Table; use Symfony\Component\Console\Input\InputArgument; @@ -84,7 +84,7 @@ protected function execute(InputInterface $input, OutputInterface $output) { $scanner = $mount->getStorage()->getScanner(); $output->writeln("Scanning group folder with id\t{$folder['id']}", OutputInterface::VERBOSITY_VERBOSE); - if ($scanner instanceof NoopScanner) { + if ($scanner instanceof ObjectStoreScanner) { $output->writeln("Scanning group folders using an object store as primary storage is not supported."); return -1; } diff --git a/lib/Mount/GroupFolderStorage.php b/lib/Mount/GroupFolderStorage.php index d95eba5f8..694c9987f 100644 --- a/lib/Mount/GroupFolderStorage.php +++ b/lib/Mount/GroupFolderStorage.php @@ -22,7 +22,6 @@ namespace OCA\GroupFolders\Mount; use OC\Files\Cache\Scanner; -use OC\Files\ObjectStore\NoopScanner; use OC\Files\ObjectStore\ObjectStoreScanner; use OC\Files\ObjectStore\ObjectStoreStorage; use OC\Files\Storage\Wrapper\Quota;