fixed file size abbreviations
This commit is contained in:
parent
965cba6774
commit
772533c130
1 changed files with 3 additions and 3 deletions
|
|
@ -330,12 +330,12 @@ sub getSize {
|
|||
my (@attributes) = stat($_[0]->{_node}->getPath.$session{os}{slash}.$_[0]->getFilename);
|
||||
if ($attributes[7] > 1048576) {
|
||||
$size = round($attributes[7]/1048576);
|
||||
$size .= 'mb';
|
||||
$size .= 'MB';
|
||||
} elsif ($attributes[7] > 1024) {
|
||||
$size = round($attributes[7]/1024);
|
||||
$size .= 'kb';
|
||||
$size .= 'kB';
|
||||
} else {
|
||||
$size = $attributes[7]."b";
|
||||
$size = $attributes[7]."B";
|
||||
}
|
||||
return $size;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue