From: Darold Gilles Date: Tue, 20 Nov 2012 13:23:29 +0000 (+0100) Subject: Replace Ctrl+M by printable \r. Thanks to Marc Cousin for the report. X-Git-Tag: v3.2~98 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fd26543cb4da1ccb5bc95532dee565b2135bb197;p=pgbadger Replace Ctrl+M by printable \r. Thanks to Marc Cousin for the report. --- diff --git a/pgbadger b/pgbadger index ca0fbf6..69c19c5 100755 --- a/pgbadger +++ b/pgbadger @@ -300,7 +300,7 @@ if ($exclude_file) { my @exclq = ; close(IN); chomp(@exclq); - map {s/ //;} @exclq; + map {s/\r//;} @exclq; foreach my $r (@exclq) { &check_regex($r, '--exclude-file'); } @@ -320,7 +320,7 @@ if ($include_file) { my @exclq = ; close(IN); chomp(@exclq); - map {s/ //;} @exclq; + map {s/\r//;} @exclq; foreach my $r (@exclq) { &check_regex($r, '--include-file'); } @@ -668,7 +668,7 @@ foreach my $logfile (@log_files) { while (my $line = <$lfile>) { $cursize += length($line); chomp($line); - $line =~ s/ //; + $line =~ s/\r//; $nlines++; next if (!$line); @@ -4067,7 +4067,7 @@ sub autodetect_format my %ident_name = (); while (my $line = <$tfile>) { chomp($line); - $line =~ s/ //; + $line =~ s/\r//; next if (!$line); $nline++; @@ -4140,7 +4140,7 @@ sub autodetect_duration my %ident_name = (); while (my $line = <$tfile>) { chomp($line); - $line =~ s/ //; + $line =~ s/\r//; next if (!$line); $nline++; if ( ($line =~ /\s+duration: \d+\.\d+ ms\s+(query|statement|prepare|parse|bind|execute)/)