]> source.dussan.org Git - nextcloud-server.git/commitdiff
Default to reusing etags in the scanner
authorRobin Appelman <icewind@owncloud.com>
Thu, 6 Nov 2014 17:34:10 +0000 (18:34 +0100)
committerRobin Appelman <icewind@owncloud.com>
Thu, 6 Nov 2014 17:34:10 +0000 (18:34 +0100)
lib/private/files/cache/scanner.php

index 444207518b2ce706bf8f54db180aeec8b670d0ba..bd25d8a944c1eac573a9e1dee8370c7343393f22 100644 (file)
@@ -216,7 +216,7 @@ class Scanner extends BasicEmitter {
         */
        public function scan($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1) {
                if ($reuse === -1) {
-                       $reuse = ($recursive === self::SCAN_SHALLOW) ? self::REUSE_ETAG | self::REUSE_SIZE : 0;
+                       $reuse = ($recursive === self::SCAN_SHALLOW) ? self::REUSE_ETAG | self::REUSE_SIZE : self::REUSE_ETAG;
                }
                $data = $this->scanFile($path, $reuse);
                $size = $this->scanChildren($path, $recursive, $reuse);
@@ -245,7 +245,7 @@ class Scanner extends BasicEmitter {
         */
        public function scanChildren($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1) {
                if ($reuse === -1) {
-                       $reuse = ($recursive === self::SCAN_SHALLOW) ? self::REUSE_ETAG | self::REUSE_SIZE : 0;
+                       $reuse = ($recursive === self::SCAN_SHALLOW) ? self::REUSE_ETAG | self::REUSE_SIZE : self::REUSE_ETAG;
                }
                $this->emit('\OC\Files\Cache\Scanner', 'scanFolder', array($path, $this->storageId));
                $size = 0;