mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-24 04:45:41 +02:00
main: get_config_path: look in XDG_CONFIG_HOME first
This commit is contained in:
parent
750615b35f
commit
63f7f6b3d8
1 changed files with 3 additions and 2 deletions
5
main.c
5
main.c
|
@ -66,12 +66,13 @@ get_config_path(void)
|
|||
{
|
||||
struct stat st;
|
||||
|
||||
char *config = get_config_path_user_config();
|
||||
char *config = get_config_path_xdg();
|
||||
if (config != NULL && stat(config, &st) == 0 && S_ISREG(st.st_mode))
|
||||
return config;
|
||||
free(config);
|
||||
|
||||
config = get_config_path_xdg();
|
||||
/* 'Default' XDG_CONFIG_HOME */
|
||||
config = get_config_path_user_config();
|
||||
if (config != NULL && stat(config, &st) == 0 && S_ISREG(st.st_mode))
|
||||
return config;
|
||||
free(config);
|
||||
|
|
Loading…
Add table
Reference in a new issue