From 1d5445e23377a5abf5fb55886f8107a94c3acf40 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Mon, 8 Oct 2007 03:37:54 +0200 Subject: [PATCH] parse-contents: Fix display of progress Files without header did confuse the line numbers --- bin/parse-contents | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/parse-contents b/bin/parse-contents index 414dc8a..b8cc8e4 100755 --- a/bin/parse-contents +++ b/bin/parse-contents @@ -82,8 +82,11 @@ for my $suite (@suites) { open CONT, "zcat $filename|$what" or die $!; - while () {last if /^FILE/mo;} - open CONT, "zcat $filename|$what" if eof(CONT); + while () { last if /^FILE/mo; } + if (eof(CONT)) { # no header found + close CONT; # explicit close to reset $. + open CONT, "zcat $filename|$what"; + } while () { my $data = ""; my %data = (); -- 2.39.2