From: Morris Jobke Date: Mon, 22 Feb 2016 13:30:32 +0000 (+0100) Subject: Avoids scanning the root storage X-Git-Tag: v9.0.0RC1~64^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8c77fdef3eac77474ff83a8fc179d38696e19ce0;p=nextcloud-server.git 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 --- diff --git a/lib/private/files/utils/scanner.php b/lib/private/files/utils/scanner.php index 59673a306cb..bc815f5f6da 100644 --- a/lib/private/files/utils/scanner.php +++ b/lib/private/files/utils/scanner.php @@ -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();