Fix sort method and Out of memory problem

This commit is contained in:
Benjamin Renard 2018-04-05 15:15:04 +02:00 committed by root
parent 4f91a06dd5
commit 3715509a13

View file

@ -137,7 +137,7 @@ foreach my $hostname ( sort(keys %Status) ) {
# Get aggregate of compressed used size (octets)
my $full_size = 0;
my $backups_count = 0;
foreach my $Backup (sort {$Backups[$a]->{num} cmp $Backups[$b]->{num}} @Backups) {
foreach my $Backup (sort {$a->{num} cmp $b->{num}} @Backups) {
if ( $full_size == 0 ) {
$full_size += $Backup->{sizeExistComp};
$full_size += $Backup->{sizeNewComp};