Mailing list config files may now have the suffix ".config" or
".conf". Similarly, if the list config file is in a separate directory, it may be called <listname>/config or <listname>/conf.
This commit is contained in:
parent
e1fe9b9d4b
commit
ea35e3f74d
10
config.c
10
config.c
@ -212,17 +212,27 @@ const struct List_Config* getListConfig(const char * listname)
|
||||
|
||||
buffer = text_easy_sprintf("%s/%s/config", MasterConfig->list_dir, listname);
|
||||
list_dir = text_easy_sprintf("%s/%s", MasterConfig->list_dir, listname);
|
||||
if (stat(buffer, &sb) != 0)
|
||||
{
|
||||
free(buffer);
|
||||
buffer = text_easy_sprintf("%s/%s/conf", MasterConfig->list_dir, listname);
|
||||
if (stat(buffer, &sb) != 0)
|
||||
{
|
||||
free(buffer);
|
||||
buffer = text_easy_sprintf("%s/%s.config", MasterConfig->list_dir, listname);
|
||||
list_dir = MasterConfig->list_dir;
|
||||
if (stat(buffer, &sb) != 0)
|
||||
{
|
||||
free(buffer);
|
||||
buffer = text_easy_sprintf("%s/%s.conf", MasterConfig->list_dir, listname);
|
||||
if (stat(buffer, &sb) != 0)
|
||||
{
|
||||
syslog(LOG_ERR, "Can't find a config file for list \"%s\".", listname);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
rc = ReadConfig(buffer, ListCF);
|
||||
if (rc != 0)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user