From: Darold Gilles Date: Mon, 10 Mar 2014 16:39:41 +0000 (+0100) Subject: Fix writing of empty incremental last parsed file. X-Git-Tag: v5.1~39 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=24f32d34a28c4db26a7ec58de5e518673305cd96;p=pgbadger Fix writing of empty incremental last parsed file. --- diff --git a/pgbadger b/pgbadger index 046a64e..cbd05d7 100755 --- a/pgbadger +++ b/pgbadger @@ -911,7 +911,7 @@ if ($last_parsed) { } # Save last line parsed -if ($last_parsed && scalar keys %last_line) { +if ($last_parsed && $last_line{datetime} && $last_line{orig}) { if (open(OUT, ">$last_parsed")) { $last_line{current_pos} ||= 0; print OUT "$last_line{datetime}\t$last_line{current_pos}\t$last_line{orig}\n";