From: Don Armstrong Date: Sat, 1 Jul 2017 17:44:17 +0000 (-0700) Subject: Debbugs::Log now handles compressed bug logs X-Git-Tag: release/2.6.0~122 X-Git-Url: https://git.donarmstrong.com/?p=debbugs.git;a=commitdiff_plain;h=4b0c01944b9a3cc024973b94cca89b68e3d0d717 Debbugs::Log now handles compressed bug logs --- diff --git a/cgi/bugreport.cgi b/cgi/bugreport.cgi index 595f414..2069e80 100755 --- a/cgi/bugreport.cgi +++ b/cgi/bugreport.cgi @@ -185,18 +185,6 @@ if (defined $param{usertag}) { } } - -my $buglogfh; -if ($buglog =~ m/\.gz$/) { - my $oldpath = $ENV{'PATH'}; - $ENV{'PATH'} = '/bin:/usr/bin'; - $buglogfh = IO::File->new("zcat $buglog |") or quitcgi("open log for $ref: $!"); - $ENV{'PATH'} = $oldpath; -} else { - $buglogfh = IO::File->new($buglog,'r') or quitcgi("open log for $ref: $!"); -} - - my %status; if ($need_status) { %status = %{split_status_fields(get_bug_status(bug=>$ref, @@ -206,13 +194,11 @@ if ($need_status) { my @records; eval{ - @records = read_log_records(logfh => $buglogfh,inner_file => 1); + @records = read_log_records(bug_num => $ref,inner_file => 1); }; if ($@) { quitcgi("Bad bug log for $gBug $ref. Unable to read records: $@"); } -undef $buglogfh; - my $log=''; my $msg_num = 0;