From f3979e5459fe4528a443e0f4eea1e1f5f7a00794 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 23 May 2016 13:53:05 +0200 Subject: dont needlessly triger the propgator in the scanner --- lib/private/Files/Cache/Scanner.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/private/Files/Cache') diff --git a/lib/private/Files/Cache/Scanner.php b/lib/private/Files/Cache/Scanner.php index 10bb5f33e08..82ec11a424b 100644 --- a/lib/private/Files/Cache/Scanner.php +++ b/lib/private/Files/Cache/Scanner.php @@ -302,7 +302,7 @@ class Scanner extends BasicEmitter implements IScanner { } $data = $this->scanFile($path, $reuse, -1, null, $lock); if ($data and $data['mimetype'] === 'httpd/unix-directory') { - $size = $this->scanChildren($path, $recursive, $reuse, $data, $lock); + $size = $this->scanChildren($path, $recursive, $reuse, $data['fileid'], $lock); $data['size'] = $size; } if ($lock) { @@ -378,7 +378,9 @@ class Scanner extends BasicEmitter implements IScanner { $size += $childSize; } } - $this->updateCache($path, array('size' => $size), $folderId); + if ($this->cacheActive) { + $this->cache->update($folderId, array('size' => $size)); + } $this->emit('\OC\Files\Cache\Scanner', 'postScanFolder', array($path, $this->storageId)); return $size; } -- cgit v1.2.3