#endif
#endif
-/**
- * Last resort choice for configuration file name.
- */
-#define GNUNET_DEFAULT_USER_CONFIG_FILE "~/.config/gnunet.conf"
-
/**
* Bandwidth (in/out) to assume initially (before either peer has
* communicated any particular preference). Should be rather low; set
*/
const char *config_file;
+ /**
+ * Configuration file name to use (if $XDG_CONFIG_HOME is not set).
+ */
+ const char *user_config_file;
+
};
.env_varname = "GNUNET_PREFIX",
.bug_email = "gnunet-developers@gnu.org",
.homepage = "http://www.gnu.org/s/gnunet/",
+ .config_file = "gnunet.conf",
+ .user_config_file = "~/.config/gnunet.conf"
};
/**
DIR_SEPARATOR_STR,
GNUNET_OS_project_data_get ()->config_file);
else
- cfg_fn = GNUNET_strdup (GNUNET_DEFAULT_USER_CONFIG_FILE);
+ cfg_fn = GNUNET_strdup (GNUNET_OS_project_data_get ()->user_config_file);
lpfx = GNUNET_strdup (binaryName);
if (NULL != (spc = strstr (lpfx, " ")))
*spc = '\0';
DIR_SEPARATOR_STR,
GNUNET_OS_project_data_get ()->config_file);
else
- cfg_fn = GNUNET_strdup (GNUNET_DEFAULT_USER_CONFIG_FILE);
+ cfg_fn = GNUNET_strdup (GNUNET_OS_project_data_get ()->user_config_file);
memset (&sctx, 0, sizeof (sctx));
sctx.options = options;
sctx.ready_confirm_fd = -1;