]> granicus.if.org Git - pgbadger/commitdiff
Fix previous commit
authorGilles Darold <gilles.darold@dalibo.com>
Wed, 15 Feb 2017 17:56:01 +0000 (18:56 +0100)
committerGilles Darold <gilles.darold@dalibo.com>
Wed, 15 Feb 2017 17:56:01 +0000 (18:56 +0100)
pgbadger

index db14b73955e860cb9831e5504b859a4a55ef937b..a6c60d18f660eb598b1b596a7320c9fea3736b3c 100644 (file)
--- 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 = <TESTFILE>;
                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);