Fix error when rebuilding with old data repository that does not have week view repository. Week directory are now create with empty html reports. Thanks to Adam Ciarcinski for the report.

This commit is contained in:
Darold Gilles 2014-05-15 18:50:18 +02:00
parent 55585b465d
commit cda8c6b10f
1 changed files with 3 additions and 0 deletions

View File

@ -1785,6 +1785,9 @@ sub _print_cache_stat
my $total_bytes = $code_stat{HIT}{bytes} + $code_stat{MISS}{bytes};
my $total_denied = $code_stat{DENIED}{request} + $code_stat{DENIED}{request};
if (!-d "$outdir") {
mkdir("$outdir", 0755) || die "ERROR: can't create directory $outdir, $!\n";
}
my $file = $outdir . '/index.html';
my $out = new IO::File;
$out->open(">$file") || die "ERROR: Unable to open $file. $!\n";