mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-24 09:52:58 +02:00
The backup.cgi displayed backups smaller than 1KB as 0KB.
Now backups smaller than 1KB are shown as 0.xx
This commit is contained in:
@@ -230,9 +230,17 @@ delete $addons{$_};
|
||||
my $Datei = "/var/ipfire/backup/addons/backup/".$_.".ipf";
|
||||
my @Info = stat($Datei);
|
||||
my $Size = $Info[7] / 1024;
|
||||
$Size = sprintf("%2d", $Size);
|
||||
|
||||
if ( -e $Datei ){
|
||||
print "<tr><td align='center'>$Lang::tr{'backup from'} $_ $Lang::tr{'size'} $Size KB $Lang::tr{'date'} ".localtime($Info[9])."</td>";
|
||||
if ($Size < 1) {
|
||||
$Size = sprintf("%.2f", $Size);
|
||||
print "<tr><td align='center'>$Lang::tr{'backup from'} $_ $Lang::tr{'size'} $Size KB $Lang::tr{'date'} ".localtime($Info[9])."</td>";
|
||||
} else {
|
||||
$Size = sprintf("%2d", $Size);
|
||||
print "<tr><td align='center'>$Lang::tr{'backup from'} $_ $Lang::tr{'size'} $Size KB $Lang::tr{'date'} ".localtime($Info[9])."</td>";
|
||||
|
||||
}
|
||||
|
||||
print <<END
|
||||
<td align='right' width='5'>
|
||||
<form method='post' action='$ENV{'SCRIPT_NAME'}'>
|
||||
|
||||
Reference in New Issue
Block a user