From 3d776f932c1561c30fb0ca7d5b38991c41e83a8c Mon Sep 17 00:00:00 2001 From: Andreas Koenig Date: Sun, 31 Dec 2017 05:59:53 +0100 Subject: [PATCH] move sanity check to empty @cand and go after $stem --- bin/analysis-oldsolutions-extinction-program.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/analysis-oldsolutions-extinction-program.pl b/bin/analysis-oldsolutions-extinction-program.pl index d94de79e..aa1f40a0 100644 --- a/bin/analysis-oldsolutions-extinction-program.pl +++ b/bin/analysis-oldsolutions-extinction-program.pl @@ -87,6 +87,10 @@ DIRENT: for my $dirent (readdir $dh) { next DIRENT; } my @cand = grep { -e $_ } glob("$workdir/$stem\{.slv.LCK,.slv,.slvdv.gz,.yml}"); + unless (@cand) { + warn "Warning: no cand for $stem, skipping"; + next DIRENT; + } if (map { /[\*\?]/ } @cand) { die "Illegal filename with glob character discovered: @cand"; } @@ -95,10 +99,6 @@ DIRENT: for my $dirent (readdir $dh) { unless (@ages){ @ages = sort { $a <=> $b } map { -M $_ } @cand; } - unless (@ages) { - warn "Warning: no ages for can @cand, skipping"; - next DIRENT; - } if ($ages[0] < $Opt{minage}) { # warn " is younger than $Opt{minage} days ($ages[0])\n"; next DIRENT; -- 2.11.4.GIT