From 16b0d52031a9c354d09044ad5e473ba87c09e8f3 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 6 Nov 2014 18:34:10 +0100 Subject: [PATCH] Default to reusing etags in the scanner --- lib/private/files/cache/scanner.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php index 444207518b..bd25d8a944 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;