gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r20986 - gnunet/src/util


From: gnunet
Subject: [GNUnet-SVN] r20986 - gnunet/src/util
Date: Mon, 16 Apr 2012 16:29:42 +0200

Author: wachs
Date: 2012-04-16 16:29:42 +0200 (Mon, 16 Apr 2012)
New Revision: 20986

Modified:
   gnunet/src/util/configuration.c
Log:
- do not parse back files .conf~  but only files with extension .conf


Modified: gnunet/src/util/configuration.c
===================================================================
--- gnunet/src/util/configuration.c     2012-04-16 13:15:35 UTC (rev 20985)
+++ gnunet/src/util/configuration.c     2012-04-16 14:29:42 UTC (rev 20986)
@@ -1228,8 +1228,17 @@
 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;
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]