]> source.dussan.org Git - nextcloud-server.git/commitdiff
Avoids scanning the root storage
authorMorris Jobke <hey@morrisjobke.de>
Mon, 22 Feb 2016 13:30:32 +0000 (14:30 +0100)
committerMorris Jobke <hey@morrisjobke.de>
Mon, 22 Feb 2016 15:43:47 +0000 (16:43 +0100)
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

lib/private/files/utils/scanner.php

index 59673a306cb0f56f10797fa3ee67cb7d8ea8c783..bc815f5f6da2714a208453fc7f0172a9eb64d130 100644 (file)
@@ -119,6 +119,10 @@ class Scanner extends PublicEmitter {
                        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();