diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-09-15 20:38:57 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-09-15 20:40:40 +0200 |
commit | 0f4e214a904952188747716b36f5dfd5a0f0c0d9 (patch) | |
tree | 5c145a8e47efb9175868575e600a71613160652b /lib | |
parent | 339c98e5e69103806f03d1eac660f69d1583c5c2 (diff) | |
download | nextcloud-server-0f4e214a904952188747716b36f5dfd5a0f0c0d9.tar.gz nextcloud-server-0f4e214a904952188747716b36f5dfd5a0f0c0d9.zip |
adding null check on a mount's storage
Diffstat (limited to 'lib')
-rw-r--r-- | lib/files/utils/scanner.php | 6 |
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); |