diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-10-17 17:06:37 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2015-02-11 13:11:31 +0100 |
commit | 9bbfeada6bb99efdd22514b3a9793a723dfa2564 (patch) | |
tree | 1144656012c8888032c8db89d8595bb55a533c19 /lib | |
parent | dc6468c2aa7ea2b75954a3a896b8ea2475769d74 (diff) | |
download | nextcloud-server-9bbfeada6bb99efdd22514b3a9793a723dfa2564.tar.gz nextcloud-server-9bbfeada6bb99efdd22514b3a9793a723dfa2564.zip |
Only try to scan the children of directories
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/files/cache/scanner.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php index c30487fbfe3..8f38d68d257 100644 --- a/lib/private/files/cache/scanner.php +++ b/lib/private/files/cache/scanner.php @@ -232,8 +232,8 @@ class Scanner extends BasicEmitter { $reuse = ($recursive === self::SCAN_SHALLOW) ? self::REUSE_ETAG | self::REUSE_SIZE : self::REUSE_ETAG; } $data = $this->scanFile($path, $reuse); - if ($data !== null) { - $size = $this->scanChildren($path, $recursive, $reuse); + if ($data and $data['mimetype'] === 'httpd/unix-directory') { + $size = $this->scanChildren($path, $recursive, $reuse, $data); $data['size'] = $size; } return $data; @@ -262,7 +262,7 @@ class Scanner extends BasicEmitter { */ protected function getNewChildren($folder) { $children = array(); - if ($this->storage->is_dir($folder) && ($dh = $this->storage->opendir($folder))) { + if ($dh = $this->storage->opendir($folder)) { if (is_resource($dh)) { while (($file = readdir($dh)) !== false) { if (!Filesystem::isIgnoredDir($file)) { |