diff --git a/lib/private/Files/Utils/Scanner.php b/lib/private/Files/Utils/Scanner.php index 6348427cb3bf1..adfd1983710af 100644 --- a/lib/private/Files/Utils/Scanner.php +++ b/lib/private/Files/Utils/Scanner.php @@ -37,6 +37,7 @@ use OC\ForbiddenException; use OC\Hooks\PublicEmitter; use OC\Lock\DBLockingProvider; +use OCA\Collectives\Mount\CollectiveStorage; use OCA\Files_Sharing\SharedStorage; use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\Events\BeforeFileScannedEvent; @@ -238,10 +239,11 @@ public function scan($dir = '', $recursive = \OC\Files\Cache\Scanner::SCAN_RECUR } } - // don't scan received local shares, these can be scanned when scanning the owner's storage - if ($storage->instanceOfStorage(SharedStorage::class)) { + // don't scan received local shares or collectives, these can be scanned when scanning the owner's storage + if (substr($storage->getId(), 0, 6) !== 'home::') { continue; } + $relativePath = $mount->getInternalPath($dir); $scanner = $storage->getScanner(); $scanner->setUseTransactions(false);