Avoids scanning the root storage
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
This commit is contained in:
parent
6f29949bca
commit
8c77fdef3e
|
@ -119,6 +119,10 @@ class Scanner extends PublicEmitter {
|
||||||
if (is_null($mount->getStorage())) {
|
if (is_null($mount->getStorage())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
// don't scan the root storage
|
||||||
|
if ($mount->getStorage()->instanceOfStorage('\OC\Files\Storage\Local') && $mount->getMountPoint() === '/') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$scanner = $mount->getStorage()->getScanner();
|
$scanner = $mount->getStorage()->getScanner();
|
||||||
$this->attachListener($mount);
|
$this->attachListener($mount);
|
||||||
$scanner->backgroundScan();
|
$scanner->backgroundScan();
|
||||||
|
|
Loading…
Reference in New Issue