Skip to content

Commit

Permalink
Fix broken open() calls
Browse files Browse the repository at this point in the history
  • Loading branch information
jcameron committed Aug 20, 2016
1 parent 4cc24ca commit 453a996
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions virtualmin-mailman-lib.pl
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ sub create_list
if ($dom) {
# Save domain and description
&lock_file($lists_file);
my %lists;
my %lists;
&read_file($lists_file, \%lists);
$lists{$full_list} = $dom."\t".$desc;
&write_file($lists_file, \%lists);
Expand Down Expand Up @@ -257,13 +257,13 @@ sub delete_list
sub list_members
{
my @rv;
open(my $MEMS, "<", "$mailman_dir/bin/list_members -r $_[0]->{'list'} |");
open(my $MEMS, "$mailman_dir/bin/list_members -r $_[0]->{'list'} |");
while(<$MEMS>) {
s/\r|\n//g;
push(@rv, { 'email' => $_, 'digest' => 'n' });
}
close($MEMS);
open($MEMS, "<", "$mailman_dir/bin/list_members -d $_[0]->{'list'} |");
open($MEMS, "$mailman_dir/bin/list_members -d $_[0]->{'list'} |");
while(<$MEMS>) {
s/\r|\n//g;
push(@rv, { 'email' => $_, 'digest' => 'y' });
Expand Down Expand Up @@ -334,7 +334,7 @@ sub get_mailman_config
{
if (!scalar(@mailman_config_cache)) {
my $lnum = 0;
open(my $CONF, "<", "$mailman_config");
open(my $CONF, "<", $mailman_config);
while(<$CONF>) {
s/\r|\n//g;
s/^\s*#.*$//;
Expand Down

0 comments on commit 453a996

Please sign in to comment.