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

Default to reusing etags in the scanner
This commit is contained in:
Morris Jobke 2015-01-09 14:38:45 +01:00
commit 800738f51a
1 changed files with 2 additions and 2 deletions

View 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);
if ($data !== null) {
@ -247,7 +247,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;