error message for failed list creation fixed

This commit is contained in:
lars 2006-05-02 00:04:38 +00:00
parent 68a65156bf
commit 5482e5a4db

View file

@ -110,12 +110,17 @@ sub make {
$list{'-host'} = $hostname; $list{'-host'} = $hostname;
} }
# does the mailing list directory already exist?
if (-e $list{'-dir'}) {
$self->_seterror(-1,
'-the mailing list directory already exists: ' . $list{'-dir'});
return undef;
}
# Attempt to make the list if we can. # Attempt to make the list if we can.
unless(-e $list{'-dir'}) { if (system("$EZMLM_BASE/ezmlm-make", @commandline, $list{'-dir'}, $list{'-qmail'}, $list{'-name'}, $list{'-host'}) != 0) {
system("$EZMLM_BASE/ezmlm-make", @commandline, $list{'-dir'}, $list{'-qmail'}, $list{'-name'}, $list{'-host'}) == 0 $self->_seterror($?, '-failed to create mailing list - check your webserver\'s log file for details');
|| ($self->_seterror($?) && return undef); return undef;
} else {
($self->_seterror(-1, '-dir must be defined in make()') && return 0);
} }
# Sort out the DIR/inlocal problem if necessary # Sort out the DIR/inlocal problem if necessary