Merge pull request #12011 from owncloud/reuse-etag-default
Default to reusing etags in the scanner
This commit is contained in:
commit
800738f51a
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue