From 6fe9e1b03b886b2c1e218d84340369c6c4a4872b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 5 Mar 2010 10:53:49 +0000 Subject: [PATCH] * Cannot call isValidPath on a logfile. This happened to work because isValidPath bypassed the Nix store API. --- src/lib/Hydra/Controller/Build.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/Hydra/Controller/Build.pm b/src/lib/Hydra/Controller/Build.pm index bf640a2c..879d0f5c 100644 --- a/src/lib/Hydra/Controller/Build.pm +++ b/src/lib/Hydra/Controller/Build.pm @@ -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`; }