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:
Peter Simons 2001-01-19 13:12:46 +00:00
parent e1fe9b9d4b
commit ea35e3f74d

View File

@ -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)
{