summaryrefslogtreecommitdiff
path: root/src
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
parentf7c320990c64ec5f29dc87340c24d5d9ebf7a835 (diff)
- fix '-c' in applications without base config
Diffstat (limited to 'src')
-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,
GNUNET_free (ipath);
}
- if (GNUNET_SYSERR ==
- GNUNET_CONFIGURATION_load_from (cfg,
- baseconfig))
+ char *dname = GNUNET_STRINGS_filename_expand (baseconfig);
+ GNUNET_free (baseconfig);
+
+ if (GNUNET_YES == GNUNET_DISK_directory_test (dname, GNUNET_YES) &&
+ GNUNET_SYSERR == GNUNET_CONFIGURATION_load_from (cfg, dname))
{
- GNUNET_free (baseconfig);
+ GNUNET_free (dname);
return GNUNET_SYSERR; /* no configuration at all found */
}
- GNUNET_free (baseconfig);
+ GNUNET_free (dname);
if ((NULL != filename) &&
(GNUNET_OK != GNUNET_CONFIGURATION_parse (cfg, filename)))
{