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:
Morris Jobke 2016-02-22 14:30:32 +01:00
parent 6f29949bca
commit 8c77fdef3e
1 changed files with 4 additions and 0 deletions

View File

@ -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();