MXS-1932: Ignore hidden files in maxscale.cnf.d

All files that are hidden (i.e. start with a period) are now ignored by
the configuration file processing.
This commit is contained in:
Markus Mäkelä 2018-06-20 13:13:11 +03:00
parent 5d4b3bc419
commit 28ae1bf24e
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -695,7 +695,7 @@ int config_cb(const char* fpath, const struct stat *sb, int typeflag, struct FTW
const char* filename = fpath + ftwbuf->base;
const char* dot = strrchr(filename, '.');
if (dot) // that must have a suffix,
if (dot && *filename != '.') // that have a suffix and are not hidden,
{
const char* suffix = dot + 1;