summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2016-05-27 14:48:34 +0200
committerVincent Petry <pvince81@owncloud.com>2016-06-01 10:27:56 +0200
commit2ca5f3f95787d9d40cf57f5e335ffd6107ebd781 (patch)
tree4e1c0623f66d68ac95a7869d94577f3d9d00a0d3 /lib/private
parent9070fd2c03c2c922065baa7cd903ed6e97c2d514 (diff)
downloadnextcloud-server-2ca5f3f95787d9d40cf57f5e335ffd6107ebd781.tar.gz
nextcloud-server-2ca5f3f95787d9d40cf57f5e335ffd6107ebd781.zip
trigger size calculation after scanning
Diffstat (limited to 'lib/private')
-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 b013cbecabc..f05805fe94a 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;
@@ -170,6 +171,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);