From: Robin Appelman Date: Thu, 6 Nov 2014 17:34:10 +0000 (+0100) Subject: Default to reusing etags in the scanner X-Git-Tag: v8.0.0alpha2~18^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=16b0d52031a9c354d09044ad5e473ba87c09e8f3;p=nextcloud-server.git Default to reusing etags in the scanner --- diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php index 444207518b2..bd25d8a944c 100644 --- a/lib/private/files/cache/scanner.php +++ b/lib/private/files/cache/scanner.php @@ -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;