summaryrefslogtreecommitdiffstats
path: root/lib/files/utils/scanner.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/files/utils/scanner.php')
-rw-r--r--lib/files/utils/scanner.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/files/utils/scanner.php b/lib/files/utils/scanner.php
index f0dc41ffad3..2cad7dd77bd 100644
--- a/lib/files/utils/scanner.php
+++ b/lib/files/utils/scanner.php
@@ -72,6 +72,9 @@ class Scanner extends PublicEmitter {
public function backgroundScan($dir) {
$mounts = $this->getMounts($dir);
foreach ($mounts as $mount) {
+ if (is_null($mount->getStorage())) {
+ continue;
+ }
$scanner = $mount->getStorage()->getScanner();
$this->attachListener($mount);
$scanner->backgroundScan();
@@ -81,6 +84,9 @@ class Scanner extends PublicEmitter {
public function scan($dir) {
$mounts = $this->getMounts($dir);
foreach ($mounts as $mount) {
+ if (is_null($mount->getStorage())) {
+ continue;
+ }
$scanner = $mount->getStorage()->getScanner();
$this->attachListener($mount);
$scanner->scan('', \OC\Files\Cache\Scanner::SCAN_RECURSIVE, \OC\Files\Cache\Scanner::REUSE_ETAG);