From: Frank Lichtenheld Date: Mon, 8 Oct 2007 01:37:54 +0000 (+0200) Subject: parse-contents: Fix display of progress X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=1d5445e23377a5abf5fb55886f8107a94c3acf40;p=deb%2Fpackages.git parse-contents: Fix display of progress Files without header did confuse the line numbers --- 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 = ();