From 58082a82b9b089de618dfe693e9342e078437451 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Mon, 16 Apr 2012 14:29:42 +0000 Subject: [PATCH] - do not parse back files .conf~ but only files with extension .conf --- src/util/configuration.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/util/configuration.c b/src/util/configuration.c index d006ed3ef..35ba15b4e 100644 --- a/src/util/configuration.c +++ b/src/util/configuration.c @@ -1228,8 +1228,17 @@ static int parse_configuration_file (void *cls, const char *filename) { struct GNUNET_CONFIGURATION_Handle *cfg = cls; + char * ext; int ret; + /* Examine file extension */ + ext = strrchr (filename, '.'); + if ((NULL == ext) || (0 != strcmp (ext, ".conf"))) + { + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Skipping file `%s'\n", filename); + return GNUNET_OK; + } + ret = GNUNET_CONFIGURATION_parse (cfg, filename); return ret; } -- 2.25.1