diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-06-02 21:04:36 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-06-02 21:04:36 +0200 |
commit | 6689d67a5bc502be3a06537259af197037ec15c4 (patch) | |
tree | 843ebfbfcd8b44fcd6da222bdbd107b00c7c4629 /lib | |
parent | e002ff60658f675dba038aca8f682080b71d6ece (diff) | |
download | nextcloud-server-6689d67a5bc502be3a06537259af197037ec15c4.tar.gz nextcloud-server-6689d67a5bc502be3a06537259af197037ec15c4.zip |
Fix recursive scanning
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/files/cache/scanner.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php index bc2931c68d0..5a71bd26e89 100644 --- a/lib/private/files/cache/scanner.php +++ b/lib/private/files/cache/scanner.php @@ -174,6 +174,7 @@ class Scanner extends BasicEmitter { * @return int the id of the added file */ protected function addToCache($path, $data) { + echo "add"; \OC_Hook::emit('Scanner', 'addToCache', array('file' => $path, 'data' => $data)); $this->emit('\OC\Files\Cache\Scanner', 'addToCache', array($path, $this->storageId, $data)); if ($this->cacheActive) { @@ -247,10 +248,11 @@ class Scanner extends BasicEmitter { try { $data = $this->scanFile($child, $reuse, true); if ($data) { + if ($data['mimetype'] === 'httpd/unix-directory' and $recursive === self::SCAN_RECURSIVE) { + $childQueue[] = $child; + } if ($data['size'] === -1) { - if ($recursive === self::SCAN_RECURSIVE) { - $childQueue[] = $child; - } else { + if ($recursive !== self::SCAN_RECURSIVE) { $size = -1; } } else if ($size !== -1) { |