Skip to content

Commit 476e85f

Browse files
committed
chore(occ): print storage values human-friendly
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: lint Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: value
1 parent 8e6fd4d commit 476e85f

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

core/Command/User/Info.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ protected function getStorageInfo(IUser $user): array {
7777
return [];
7878
}
7979
return [
80-
'free' => $storage['free'],
81-
'used' => $storage['used'],
82-
'total' => $storage['total'],
83-
'relative' => $storage['relative'],
84-
'quota' => $storage['quota'],
80+
'free' => \OC_Helper::humanFileSize($storage['free']),
81+
'used' => \OC_Helper::humanFileSize($storage['used']),
82+
'total' => \OC_Helper::humanFileSize($storage['total']),
83+
'usedSpacePercent' => $storage['relative'] . '%',
84+
'quota' => ($storage['quota'] >= 0) ? \OC_Helper::humanFileSize($storage['quota']) : $storage['quota'],
8585
];
8686
}
8787

0 commit comments

Comments
 (0)