]> granicus.if.org Git - pgbadger/commitdiff
Remove test to read log file during log format auto-detection when the file is hosted...
authorGilles Darold <gilles.darold@dalibo.com>
Wed, 15 Feb 2017 17:54:35 +0000 (18:54 +0100)
committerGilles Darold <gilles.darold@dalibo.com>
Wed, 15 Feb 2017 17:54:35 +0000 (18:54 +0100)
pgbadger

index 60c29cade1451b8ec0261428c7984f8e74b9bc50..db14b73955e860cb9831e5504b859a4a55ef937b 100644 (file)
--- a/pgbadger
+++ b/pgbadger
@@ -13692,9 +13692,12 @@ sub autodetect_format
        my $fmt    = '';
        my %ident_name = ();
 
-       localdie("FATAL: when looking for log file format, can't open file $file, $!\n") unless(open(TESTFILE, $file));
-       my $fltf = <TESTFILE>;
-       close(TESTFILE);
+       if (!$remote_host) {
+               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';