mirror of https://github.com/jimsalterjrs/sanoid
fix uninitialized value warning in debug mode on initial run (no snapshots yet)
This commit is contained in:
parent
22160deb8e
commit
4af2948382
4
sanoid
4
sanoid
|
|
@ -492,6 +492,9 @@ sub blabber {
|
||||||
my $path = $config{$section}{'path'};
|
my $path = $config{$section}{'path'};
|
||||||
print "Filesystem $path has:\n";
|
print "Filesystem $path has:\n";
|
||||||
print " $snapsbypath{$path}{'numsnaps'} total snapshots ";
|
print " $snapsbypath{$path}{'numsnaps'} total snapshots ";
|
||||||
|
if ($snapsbypath{$path}{'numsnaps'} == 0) {
|
||||||
|
print "(no current snapshots)"
|
||||||
|
} else {
|
||||||
print "(newest: ";
|
print "(newest: ";
|
||||||
my $newest = sprintf("%.1f",$snapsbypath{$path}{'newest'} / 60 / 60);
|
my $newest = sprintf("%.1f",$snapsbypath{$path}{'newest'} / 60 / 60);
|
||||||
print "$newest hours old)\n";
|
print "$newest hours old)\n";
|
||||||
|
|
@ -503,6 +506,7 @@ sub blabber {
|
||||||
my $newest = sprintf("%.1f",($snapsbytype{$path}{$type}{'newest'} / 60 / 60));
|
my $newest = sprintf("%.1f",($snapsbytype{$path}{$type}{'newest'} / 60 / 60));
|
||||||
print "$newest hours old, named $snapsbytype{$path}{$type}{'newestname'}\n";
|
print "$newest hours old, named $snapsbytype{$path}{$type}{'newestname'}\n";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
print "\n\n";
|
print "\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue