From 134a3f657ab351cb72df449f80d6a1a77e9710d4 Mon Sep 17 00:00:00 2001 From: Gilles Darold Date: Wed, 15 Feb 2017 19:04:01 +0100 Subject: [PATCH] Fix again last patch --- pgbadger | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pgbadger b/pgbadger index a6c60d1..b88d7d5 100644 --- a/pgbadger +++ b/pgbadger @@ -13691,16 +13691,17 @@ sub autodetect_format my $nline = 0; my $fmt = ''; my %ident_name = (); + my $fltf; if (!$remote_host) { localdie("FATAL: when looking for log file format, can't open file $file, $!\n") unless(open(TESTFILE, $file)); - my $fltf = ; + $fltf = ; close(TESTFILE); + } - # is file in binary format ? - if ( $fltf =~ /^pst\d/ ) { - $fmt = 'binary'; - } + # is file in binary format ? + if ( $fltf =~ /^pst\d/ ) { + $fmt = 'binary'; } else { # try to detect syslogs, stderr, csv or pgbouncer format my ($tfile, $totalsize) = &get_log_file($file, $remote_host); -- 2.40.0