This check will skip the background scan for the root storage
because there is nothing in the root storage that isn't already
in another (mostly user-) storage.
Fixes #22501
if (is_null($mount->getStorage())) {
continue;
}
+ // don't scan the root storage
+ if ($mount->getStorage()->instanceOfStorage('\OC\Files\Storage\Local') && $mount->getMountPoint() === '/') {
+ continue;
+ }
$scanner = $mount->getStorage()->getScanner();
$this->attachListener($mount);
$scanner->backgroundScan();