aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2019-07-03 10:02:52 +0200
committerGitHub <noreply@github.com>2019-07-03 10:02:52 +0200
commiteaabe97373baa68b5e3c396bf8e1f5a3f17ac1b6 (patch)
treef49464554655d09bcac38e5a23819f207e3cd9b2 /apps/files
parentffb6230efb0b7eda8b2a3836f57561f04b39d3f7 (diff)
parentfda7f5edb489d3f1eddb25ed67c9c8d43cb3c551 (diff)
downloadnextcloud-server-eaabe97373baa68b5e3c396bf8e1f5a3f17ac1b6.tar.gz
nextcloud-server-eaabe97373baa68b5e3c396bf8e1f5a3f17ac1b6.zip
Merge pull request #16200 from nextcloud/revert/16049-wrong-round
Revert incorrect rouding
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/lib/Controller/ViewController.php2
-rw-r--r--apps/files/tests/Controller/ViewControllerTest.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php
index 1bcc3e4c7f9..509f927a295 100644
--- a/apps/files/lib/Controller/ViewController.php
+++ b/apps/files/lib/Controller/ViewController.php
@@ -230,7 +230,7 @@ class ViewController extends Controller {
$nav->assign('navigationItems', $navItems);
- $nav->assign('usage', \OC_Helper::humanFileSize(ceil($storageInfo['used'] / 102400) * 102400));
+ $nav->assign('usage', \OC_Helper::humanFileSize($storageInfo['used']));
if ($storageInfo['quota'] === \OCP\Files\FileInfo::SPACE_UNLIMITED) {
$totalSpace = $this->l10n->t('Unlimited');
} else {
diff --git a/apps/files/tests/Controller/ViewControllerTest.php b/apps/files/tests/Controller/ViewControllerTest.php
index 5f22648b279..d051ab7258d 100644
--- a/apps/files/tests/Controller/ViewControllerTest.php
+++ b/apps/files/tests/Controller/ViewControllerTest.php
@@ -141,7 +141,7 @@ class ViewControllerTest extends TestCase {
$nav = new Template('files', 'appnavigation');
$nav->assign('usage_relative', 123);
- $nav->assign('usage', '100 KB');
+ $nav->assign('usage', '123 B');
$nav->assign('quota', 100);
$nav->assign('total_space', '100 B');
//$nav->assign('webdavurl', '');