* Cannot call isValidPath on a logfile. This happened to work because

isValidPath bypassed the Nix store API.
This commit is contained in:
Eelco Dolstra 2010-03-05 10:53:49 +00:00
parent 79a1489c95
commit 6fe9e1b03b

View file

@ -50,7 +50,7 @@ sub view_build : Chained('build') PathPart('') Args(0) {
(my $lastBuildStep) = $build->buildsteps->search({},{order_by => "stepnr DESC", rows => 1});
my $path = defined $lastBuildStep ? $lastBuildStep->logfile : "" ;
if (defined $build->resultInfo && $build->resultInfo->buildstatus == 1 && !($path eq "") && isValidPath($lastBuildStep->logfile)) {
if (defined $build->resultInfo && $build->resultInfo->buildstatus == 1 && !($path eq "") && -f $lastBuildStep->logfile) {
$c->stash->{logtext} = `tail -n 50 $path`;
}