Message ID | c8cfa1fb5a5924f06a3f9633bc70daee47b60d53.1301562707.git.ydroneaud@opteya.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/src/init.c b/src/init.c index 46ff24c..dd6fb00 100644 --- a/src/init.c +++ b/src/init.c @@ -311,6 +311,9 @@ static void read_config(void) if (dent->d_name[0] == '.') continue; + if (dent->d_name[0] == '\0' || dent->d_name[strlen(dent->d_name) - 1] == '~') + continue; + if (asprintf(&path, "%s/%s", IBV_CONFIG_DIR, dent->d_name) < 0) { fprintf(stderr, PFX "Warning: couldn't read config file %s/%s.\n", IBV_CONFIG_DIR, dent->d_name);