]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix recursive scanning
authorRobin Appelman <icewind@owncloud.com>
Mon, 2 Jun 2014 19:04:36 +0000 (21:04 +0200)
committerRobin Appelman <icewind@owncloud.com>
Mon, 2 Jun 2014 19:04:36 +0000 (21:04 +0200)
lib/private/files/cache/scanner.php

index bc2931c68d02904c0f5705201f3aea8d9d1f8680..5a71bd26e8979b328e161d320b592484c53e9d88 100644 (file)
@@ -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) {