Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/private/legacy/OC_Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public static function humanFileSize($bytes) {
/**
* Make a computer file size
* @param string $str file size in human readable format
* @return int|false a file size in bytes
* @return float|false a file size in bytes
*
* Makes 2kB to 2048.
*
Expand All @@ -104,7 +104,7 @@ public static function humanFileSize($bytes) {
public static function computerFileSize($str) {
$str = strtolower($str);
if (is_numeric($str)) {
return (int)$str;
return (float)$str;
}

$bytes_array = [
Expand All @@ -131,7 +131,7 @@ public static function computerFileSize($str) {

$bytes = round($bytes);

return (int)$bytes;
return $bytes;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/private/legacy/OC_Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public static function isDefaultExpireDateEnforced() {
* Get the quota of a user
*
* @param IUser|null $user
* @return int|\OCP\Files\FileInfo::SPACE_UNLIMITED|false Quota bytes
* @return float|\OCP\Files\FileInfo::SPACE_UNLIMITED|false Quota bytes
*/
public static function getUserQuota(?IUser $user) {
if (is_null($user)) {
Expand Down