Correct XDG paths precedence for config files

Fixes #3323
This commit is contained in:
Orestis Floros
2018-07-10 05:04:34 +03:00
parent 6339427f01
commit fd70ea6b31
4 changed files with 41 additions and 33 deletions

View File

@ -506,11 +506,11 @@ int logical_px(const int logical);
char *resolve_tilde(const char *path);
/**
* Get the path of the first configuration file found. If override_configpath
* is specified, that path is returned and saved for further calls. Otherwise,
* checks the home directory first, then the system directory first, always
* taking into account the XDG Base Directory Specification ($XDG_CONFIG_HOME,
* $XDG_CONFIG_DIRS)
* Get the path of the first configuration file found. If override_configpath is
* specified, that path is returned and saved for further calls. Otherwise,
* checks the home directory first, then the system directory, always taking
* into account the XDG Base Directory Specification ($XDG_CONFIG_HOME,
* $XDG_CONFIG_DIRS).
*
*/
char *get_config_path(const char *override_configpath, bool use_system_paths);