From 0f4e214a904952188747716b36f5dfd5a0f0c0d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Sun, 15 Sep 2013 20:38:57 +0200 Subject: [PATCH] adding null check on a mount's storage --- lib/files/utils/scanner.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/files/utils/scanner.php b/lib/files/utils/scanner.php index f0dc41ffad..2cad7dd77b 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);