Skip to content
Snippets Groups Projects
Commit 800738f5 authored by Morris Jobke's avatar Morris Jobke
Browse files

Merge pull request #12011 from owncloud/reuse-etag-default

Default to reusing etags in the scanner
parents 1f1643b3 16b0d520
No related branches found
No related tags found
No related merge requests found
...@@ -216,7 +216,7 @@ class Scanner extends BasicEmitter { ...@@ -216,7 +216,7 @@ class Scanner extends BasicEmitter {
*/ */
public function scan($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1) { public function scan($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1) {
if ($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); $data = $this->scanFile($path, $reuse);
if ($data !== null) { if ($data !== null) {
...@@ -247,7 +247,7 @@ class Scanner extends BasicEmitter { ...@@ -247,7 +247,7 @@ class Scanner extends BasicEmitter {
*/ */
public function scanChildren($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1) { public function scanChildren($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1) {
if ($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)); $this->emit('\OC\Files\Cache\Scanner', 'scanFolder', array($path, $this->storageId));
$size = 0; $size = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment