diff options
author | 2023-04-19 15:27:50 -0700 | |
---|---|---|
committer | 2023-04-19 15:27:50 -0700 | |
commit | ca7e83173e09bafdb5763df6fd50cec499b14a85 (patch) | |
tree | 5ef86df0775c49aadc4df5460b1200993a3b5307 | |
parent | Add initial files for the metastructure-2023 election. (diff) | |
download | elections-ca7e83173e09bafdb5763df6fd50cec499b14a85.tar.gz elections-ca7e83173e09bafdb5763df6fd50cec499b14a85.tar.bz2 elections-ca7e83173e09bafdb5763df6fd50cec499b14a85.zip |
Votify: handle empty control files, e.g. empty voters
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rw-r--r-- | Votify.pm | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -132,8 +132,9 @@ sub get_single_election_hashref { #print STDERR "Scan $fn\n"; my @filenames = (sprintf("%s/%s", "$basedir/$election_name", $fn), sprintf("%s/%s-%s", "$basedir/$election_name", $fn, $election_name)); #print STDERR Dumper(@filenames); - my $filename = abs_path(List::Util::first { $_ && -r $_ && -s $_ && ! -d $_ } @filenames); - $election{"${fn}file"} = $filename; + my $filename = List::Util::first { $_ && -r $_ && -s $_ && ! -d $_ } @filenames; + my $absfilename = abs_path($filename) if $filename; + $election{"${fn}file"} = $absfilename if $absfilename; }; #print Dumper(%election); $election{starttime} = grabfile_int($election{'startfile'}); |