From 702ce3ddfb9c865b455cc8ca663621aaba115015 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 21 Jun 2017 13:22:17 +0100 Subject: [PATCH] sg-run-job: Logfiles: Suppress links to 0-length files These are not really helpful. Making them not be links makes them easier to skip by eye. Signed-off-by: Ian Jackson --- v2: New patch. --- sg-report-flight | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sg-report-flight b/sg-report-flight index f7150a09..fd8a68bc 100755 --- a/sg-report-flight +++ b/sg-report-flight @@ -1042,15 +1042,19 @@ END or $dent eq '..' or $dent eq '.' or $issteplog{$dent}; stat("$htmldir/$job/$dent") or die "$dent $!"; printf H "%s", show_abs_time((stat _)[9]); + my $nolink = 0; if (-f _) { my $size = (stat _)[7]; printf H " %s", $size; + $nolink = !$size; } else { print H "dir"; } print H ""; - print H "". - encode_entities($dent).(-d _ ? "/" : "")."\n"; + print H "" + unless $nolink; + print H encode_entities($dent).(-d _ ? "/" : ""); + print H "" unless $nolink; if ($dent eq 'build') { print H " (outputs from build)"; } -- 2.39.5