From: Gilles Darold Date: Wed, 15 Feb 2017 17:54:35 +0000 (+0100) Subject: Remove test to read log file during log format auto-detection when the file is hosted... X-Git-Tag: v9.2~19 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5608c5394b36651f7cce230f610b9baeda755b81;p=pgbadger Remove test to read log file during log format auto-detection when the file is hosted remotly. Thanks to clomdd for the report. --- diff --git a/pgbadger b/pgbadger index 60c29ca..db14b73 100644 --- 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 = ; - 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 = ; + close(TESTFILE); + } + # is file in binary format ? if ( $fltf =~ /^pst\d/ ) { $fmt = 'binary';