summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-02-22 14:30:32 +0100
committerMorris Jobke <hey@morrisjobke.de>2016-02-22 16:43:47 +0100
commit8c77fdef3eac77474ff83a8fc179d38696e19ce0 (patch)
treeb9433b598f66172c3e16e99ea278252303314760
parent6f29949bcaef690a93d7ecfb5cde8fa08ce36db7 (diff)
downloadnextcloud-server-8c77fdef3eac77474ff83a8fc179d38696e19ce0.tar.gz
nextcloud-server-8c77fdef3eac77474ff83a8fc179d38696e19ce0.zip
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
-rw-r--r--lib/private/files/utils/scanner.php4
1 files changed, 4 insertions, 0 deletions
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();