summaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Utils
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2016-05-30 11:14:31 +0200
committerThomas Müller <DeepDiver1975@users.noreply.github.com>2016-05-30 11:14:31 +0200
commitd717b583d22c66c08563e35b9b770a8b18954087 (patch)
treeea2c5a5786b8d717763e63cbc452101aad442070 /lib/private/Files/Utils
parent985063a7e2307ba645e4912c147ac381fa7b6974 (diff)
downloadnextcloud-server-d717b583d22c66c08563e35b9b770a8b18954087.tar.gz
nextcloud-server-d717b583d22c66c08563e35b9b770a8b18954087.zip
trigger size calculation after scanning (#24875)
Diffstat (limited to 'lib/private/Files/Utils')
-rw-r--r--lib/private/Files/Utils/Scanner.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/private/Files/Utils/Scanner.php b/lib/private/Files/Utils/Scanner.php
index 470b12bb44a..9b55c312e26 100644
--- a/lib/private/Files/Utils/Scanner.php
+++ b/lib/private/Files/Utils/Scanner.php
@@ -25,6 +25,7 @@
namespace OC\Files\Utils;
+use OC\Files\Cache\Cache;
use OC\Files\Filesystem;
use OC\ForbiddenException;
use OC\Hooks\PublicEmitter;
@@ -182,6 +183,11 @@ class Scanner extends PublicEmitter {
}
try {
$scanner->scan($relativePath, \OC\Files\Cache\Scanner::SCAN_RECURSIVE, \OC\Files\Cache\Scanner::REUSE_ETAG | \OC\Files\Cache\Scanner::REUSE_SIZE);
+ $cache = $storage->getCache();
+ if ($cache instanceof Cache) {
+ // only re-calculate for the root folder we scanned, anything below that is taken care of by the scanner
+ $cache->correctFolderSize($relativePath);
+ }
} catch (StorageNotAvailableException $e) {
$this->logger->error('Storage ' . $storage->getId() . ' not available');
$this->logger->logException($e);