From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1PyTkc-0005l4-RF for garchives@archives.gentoo.org; Sat, 12 Mar 2011 18:41:18 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0DA6B1C012; Sat, 12 Mar 2011 18:41:11 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id D40321C012 for ; Sat, 12 Mar 2011 18:41:11 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2748E1B4100 for ; Sat, 12 Mar 2011 18:41:11 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by flycatcher.gentoo.org (Postfix) with ESMTP id 444D72005C for ; Sat, 12 Mar 2011 18:41:08 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <77343313c5066402dbff5968a45dc78e811c7434.robbat2@gentoo> Subject: [gentoo-commits] proj/elections:master commit in: / X-VCS-Repository: proj/elections X-VCS-Files: votify X-VCS-Directories: / X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: 77343313c5066402dbff5968a45dc78e811c7434 Date: Sat, 12 Mar 2011 18:41:08 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 5b293aa0ce60f72fd7406f260953a76a commit: 77343313c5066402dbff5968a45dc78e811c7434 Author: Robin H. Johnson gentoo org> AuthorDate: Sat Mar 12 18:41:02 2011 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Sat Mar 12 18:41:02 2011 +0000 URL: http://sources.gentoo.org/gitweb/?p=3Dproj/elections.git;a=3D= commit;h=3D77343313 Missed a second place in votify where the old mtime algorithm was used. --- votify | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/votify b/votify index 2ed6926..e607d66 100755 --- a/votify +++ b/votify @@ -139,8 +139,16 @@ my ($b) =3D Ballot->new($election); # Check if the election is open. This should really happen in an # Election class in Votify.pm eventually my ($starttime, $stoptime); -if (stat("$Votify::datadir/start-$election")) { $starttime =3D (stat _)[= 9] } -if (stat("$Votify::datadir/stop-$election")) { $stoptime =3D (stat _)[9]= } +my ($startfile) =3D sprintf "%s/start-%s", $Votify::datadir, $election; +my ($stopfile) =3D sprintf "%s/stop-%s", $Votify::datadir, $election; +if ( -f $startfile ) { + $starttime =3D grabfile_int($startfile); + $starttime =3D (stat _)[9] if stat($startfile) and (!defined($starttime= ) or ($starttime <=3D 0)); +} +if ( -f $stopfile ) { + ($stoptime) =3D grabfile_int($stopfile); + $stoptime =3D (stat _)[9] if stat($stopfile) and (!defined($stoptime) o= r ($stoptime <=3D 0)); +} if ($starttime && $starttime > time) { print "\n", "*" x 75, "\n"; print "WARNING: Specified election doesn't start until ",