Don't trim @PrevDays (causing an error) if it isn't long enough.
authorBrian Gaeke <gaeke@uiuc.edu>
Fri, 11 Jun 2004 19:55:30 +0000 (19:55 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Fri, 11 Jun 2004 19:55:30 +0000 (19:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14156 91177308-0d34-0410-b5e6-96231b3b80d8

utils/NightlyTest.pl

index 7393041c277320d5ae7dd4504076cc8d30085cb2..8838026c610510941fd8ba6ed5c7aab11bdb8801 100755 (executable)
@@ -655,7 +655,9 @@ if ($BuildError eq "") {
 #
 my @PrevDays = map {s/.html//; $_} GetDir ".html";
 
-splice @PrevDays, 20;  # Trim down list to something reasonable...
+if ((scalar @PrevDays) > 20) {
+  splice @PrevDays, 20;  # Trim down list to something reasonable...
+}
 
 my $PrevDaysList =     # Format list for sidebar
   join "\n  ", map { "<a href=\"$_.html\">$_</a><br>" } @PrevDays;