aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/lib/Scanner.php5
-rw-r--r--apps/files_sharing/tests/External/ScannerTest.php6
2 files changed, 7 insertions, 4 deletions
diff --git a/apps/files_sharing/lib/Scanner.php b/apps/files_sharing/lib/Scanner.php
index baab7a862bd..d5a1c24418e 100644
--- a/apps/files_sharing/lib/Scanner.php
+++ b/apps/files_sharing/lib/Scanner.php
@@ -25,7 +25,7 @@
namespace OCA\Files_Sharing;
-use OC\Files\ObjectStore\NoopScanner;
+use OC\Files\ObjectStore\ObjectStoreScanner;
/**
* Scanner for SharedStorage
@@ -72,7 +72,8 @@ class Scanner extends \OC\Files\Cache\Scanner {
public function scanFile($file, $reuseExisting = 0, $parentId = -1, $cacheData = null, $lock = true, $data = null) {
$sourceScanner = $this->getSourceScanner();
- if ($sourceScanner instanceof NoopScanner) {
+ if ($sourceScanner instanceof ObjectStoreScanner) {
+ // ObjectStoreScanner doesn't scan
return [];
} else {
return parent::scanFile($file, $reuseExisting, $parentId, $cacheData, $lock);
diff --git a/apps/files_sharing/tests/External/ScannerTest.php b/apps/files_sharing/tests/External/ScannerTest.php
index 2d2486737dc..8d077715b2d 100644
--- a/apps/files_sharing/tests/External/ScannerTest.php
+++ b/apps/files_sharing/tests/External/ScannerTest.php
@@ -26,9 +26,11 @@ namespace OCA\Files_Sharing\Tests\External;
use OCA\Files_Sharing\External\Scanner;
use Test\TestCase;
+/**
+ * @group DB
+ */
class ScannerTest extends TestCase {
- /** @var \OCA\Files_Sharing\External\Scanner */
- protected $scanner;
+ protected Scanner $scanner;
/** @var \OCA\Files_Sharing\External\Storage|\PHPUnit\Framework\MockObject\MockObject */
protected $storage;
/** @var \OC\Files\Cache\Cache|\PHPUnit\Framework\MockObject\MockObject */