Permalink
Browse files

Fix issue with logs read from stdin. Thanks to hubert depesz lubaczew…

…ski for the report.
  • Loading branch information...
1 parent d6ebbec commit fea0cfb8a2f21fccc9e5d86d86e798e3cd001c92 @darold darold committed Mar 11, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 pgbadger
View
@@ -6097,7 +6097,8 @@ sub get_log_file
# Open a file handle
if ($logf !~ /\.(gz|bz2|zip)/i) {
- open($lfile,"<",$logf) || die "FATAL: cannot read log file $logf. $!\n";
+ open($lfile, $logf) || die "FATAL: cannot read log file $logf. $!\n";
+ $totalsize = 0 if ($lfile eq '-');
} else {
my $uncompress = $zcat;
if (($logf =~ /\.bz2/i) && ($zcat =~ /^$zcat_cmd$/)) {

0 comments on commit fea0cfb

Please sign in to comment.