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
1 changed files with 10 additions and 5 deletions

View File

@ -110,12 +110,17 @@ sub make {
$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.
unless(-e $list{'-dir'}) {
system("$EZMLM_BASE/ezmlm-make", @commandline, $list{'-dir'}, $list{'-qmail'}, $list{'-name'}, $list{'-host'}) == 0
|| ($self->_seterror($?) && return undef);
} else {
($self->_seterror(-1, '-dir must be defined in make()') && return 0);
if (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');
return undef;
}
# Sort out the DIR/inlocal problem if necessary