From: Gilles Darold Date: Wed, 15 Feb 2017 17:56:01 +0000 (+0100) Subject: Fix previous commit X-Git-Tag: v9.2~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5e3aa26530b53a127fd7cb18ebeae8042b30352f;p=pgbadger Fix previous commit --- diff --git a/pgbadger b/pgbadger index db14b73..a6c60d1 100644 --- a/pgbadger +++ b/pgbadger @@ -13696,11 +13696,11 @@ sub autodetect_format localdie("FATAL: when looking for log file format, can't open file $file, $!\n") unless(open(TESTFILE, $file)); my $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);