Skip to content

Commit

Permalink
Ignore shared Collective mounts when scanning files
Browse files Browse the repository at this point in the history
Signed-off-by: Arno Welzel <github@arnowelzel.de>
  • Loading branch information
arnowelzel authored and skjnldsv committed Feb 24, 2024
1 parent f6dba96 commit 7de651b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/private/Files/Utils/Scanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -239,9 +240,10 @@ 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)) {
if ($storage->instanceOfStorage(SharedStorage::class) || $storage->instanceOfStorage(CollectiveStorage::class)) {
continue;
}

$relativePath = $mount->getInternalPath($dir);
$scanner = $storage->getScanner();
$scanner->setUseTransactions(false);
Expand Down

0 comments on commit 7de651b

Please sign in to comment.