From ea35e3f74df771d389efa7545ce4b6c0902fb33d Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Fri, 19 Jan 2001 13:12:46 +0000 Subject: [PATCH] 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 /config or /conf. --- config.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/config.c b/config.c index e39a403..e9d1e82 100644 --- a/config.c +++ b/config.c @@ -215,12 +215,22 @@ const struct List_Config* getListConfig(const char * listname) if (stat(buffer, &sb) != 0) { free(buffer); - buffer = text_easy_sprintf("%s/%s.config", MasterConfig->list_dir, listname); - list_dir = MasterConfig->list_dir; + 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); + 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);