aboutsummaryrefslogtreecommitdiff
path: root/src/util/configuration_loader.c
diff options
context:
space:
mode:
authorAlessio Vanni <vannilla@firemail.cc>2020-10-26 01:26:27 +0100
committerChristian Grothoff <christian@grothoff.org>2020-10-26 14:45:31 +0100
commit092c2c714e085a66834127bfb1e841486fd4f54c (patch)
treef3633d394485b62c55d54d2a96be9181dde9aca7 /src/util/configuration_loader.c
parentf7c320990c64ec5f29dc87340c24d5d9ebf7a835 (diff)
downloadgnunet-092c2c714e085a66834127bfb1e841486fd4f54c.tar.gz
gnunet-092c2c714e085a66834127bfb1e841486fd4f54c.zip
- fix '-c' in applications without base config
Diffstat (limited to 'src/util/configuration_loader.c')
-rw-r--r--src/util/configuration_loader.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/util/configuration_loader.c b/src/util/configuration_loader.c
index 51af24a9f..a59477b25 100644
--- a/src/util/configuration_loader.c
+++ b/src/util/configuration_loader.c
@@ -63,14 +63,16 @@ GNUNET_CONFIGURATION_load (struct GNUNET_CONFIGURATION_Handle *cfg,
63 GNUNET_free (ipath); 63 GNUNET_free (ipath);
64 } 64 }
65 65
66 if (GNUNET_SYSERR == 66 char *dname = GNUNET_STRINGS_filename_expand (baseconfig);
67 GNUNET_CONFIGURATION_load_from (cfg, 67 GNUNET_free (baseconfig);
68 baseconfig)) 68
69 if (GNUNET_YES == GNUNET_DISK_directory_test (dname, GNUNET_YES) &&
70 GNUNET_SYSERR == GNUNET_CONFIGURATION_load_from (cfg, dname))
69 { 71 {
70 GNUNET_free (baseconfig); 72 GNUNET_free (dname);
71 return GNUNET_SYSERR; /* no configuration at all found */ 73 return GNUNET_SYSERR; /* no configuration at all found */
72 } 74 }
73 GNUNET_free (baseconfig); 75 GNUNET_free (dname);
74 if ((NULL != filename) && 76 if ((NULL != filename) &&
75 (GNUNET_OK != GNUNET_CONFIGURATION_parse (cfg, filename))) 77 (GNUNET_OK != GNUNET_CONFIGURATION_parse (cfg, filename)))
76 { 78 {