projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2cb5aae
)
- do not parse back files .conf~ but only files with extension .conf
author
Matthias Wachs
<wachs@net.in.tum.de>
Mon, 16 Apr 2012 14:29:42 +0000
(14:29 +0000)
committer
Matthias Wachs
<wachs@net.in.tum.de>
Mon, 16 Apr 2012 14:29:42 +0000
(14:29 +0000)
src/util/configuration.c
patch
|
blob
|
history
diff --git
a/src/util/configuration.c
b/src/util/configuration.c
index d006ed3ef3e10ba24968a4c881d754140b11f345..35ba15b4e02675835cf454d1e5842ad780ffc669 100644
(file)
--- 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;
}