diff options
author | icewind1991 <robin@icewind.nl> | 2013-09-15 13:47:16 -0700 |
---|---|---|
committer | icewind1991 <robin@icewind.nl> | 2013-09-15 13:47:16 -0700 |
commit | da0631e1854529493b405c3c6036c91bd941a6ba (patch) | |
tree | 5c145a8e47efb9175868575e600a71613160652b | |
parent | 339c98e5e69103806f03d1eac660f69d1583c5c2 (diff) | |
parent | 0f4e214a904952188747716b36f5dfd5a0f0c0d9 (diff) | |
download | nextcloud-server-da0631e1854529493b405c3c6036c91bd941a6ba.tar.gz nextcloud-server-da0631e1854529493b405c3c6036c91bd941a6ba.zip |
Merge pull request #4860 from owncloud/fixing-potential-null-storage-on-scanner-master
adding null check on a mount's storage
-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); |