Skip to content

Commit

Permalink
chore(occ): print storage values human-friendly
Browse files Browse the repository at this point in the history
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
  • Loading branch information
solracsf committed Oct 28, 2024
1 parent 8e6fd4d commit 476e85f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions core/Command/User/Info.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ protected function getStorageInfo(IUser $user): array {
return [];
}
return [
'free' => $storage['free'],
'used' => $storage['used'],
'total' => $storage['total'],
'relative' => $storage['relative'],
'quota' => $storage['quota'],
'free' => \OC_Helper::humanFileSize($storage['free']),
'used' => \OC_Helper::humanFileSize($storage['used']),
'total' => \OC_Helper::humanFileSize($storage['total']),
'usedSpacePercent' => $storage['relative'] . '%',
'quota' => ($storage['quota'] >= 0) ? \OC_Helper::humanFileSize($storage['quota']) : $storage['quota'],
];
}

Expand Down

0 comments on commit 476e85f

Please sign in to comment.