X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FViewVCS.pm;h=60cc1376f29d49a9fe88988a9136e34cebb4a941;hb=4cad67e24c9babd9422ed0c450a49d38df2cb314;hp=b238e83213935ed76716189f24e0b5ee99c2ccd7;hpb=ff57c4d03ca6fda821fb841507269da4ff4a99b7;p=public-inbox.git diff --git a/lib/PublicInbox/ViewVCS.pm b/lib/PublicInbox/ViewVCS.pm index b238e832..60cc1376 100644 --- a/lib/PublicInbox/ViewVCS.pm +++ b/lib/PublicInbox/ViewVCS.pm @@ -62,8 +62,11 @@ sub dbg_log ($) { return '
debug log seek error
'; } $log = do { local $/; <$log> } // do { - warn "readline(log): $!"; - return '
debug log read error
'; + if (!eof($log)) { + warn "readline(log): $!"; + return '
debug log read error
'; + } + ''; }; return '' if $log eq ''; $ctx->{-linkify} //= PublicInbox::Linkify->new; @@ -586,7 +589,10 @@ sub show ($$;$) { } $ctx->{fn} = $fn; $ctx->{-tmp} = File::Temp->newdir("solver.$oid_b-XXXX", TMPDIR => 1); - open $ctx->{lh}, '+>>', "$ctx->{-tmp}/solve.log" or die "open: $!"; + unless ($ctx->{lh}) { + open $ctx->{lh}, '+>>', "$ctx->{-tmp}/solve.log" or + die "open: $!"; + } my $solver = PublicInbox::SolverGit->new($ctx->{ibx}, \&solve_result, $ctx); $solver->{gits} //= [ $ctx->{git} ];