mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-23 03:03:02 +01:00
Made configdir check XDG_CONFIG_HOME for config dir
This commit is contained in:
parent
bb0251a027
commit
1e0310cfed
@ -98,6 +98,8 @@ char *get_user_config_dir(void)
|
|||||||
|
|
||||||
snprintf(user_config_dir, len, "%s/Library/Application Support", home);
|
snprintf(user_config_dir, len, "%s/Library/Application Support", home);
|
||||||
# else /* __APPLE__ */
|
# else /* __APPLE__ */
|
||||||
|
|
||||||
|
if (!(user_config_dir = getenv("XDG_CONFIG_HOME"))) {
|
||||||
len = strlen(home) + strlen("/.config") + 1;
|
len = strlen(home) + strlen("/.config") + 1;
|
||||||
user_config_dir = malloc(len);
|
user_config_dir = malloc(len);
|
||||||
|
|
||||||
@ -106,6 +108,8 @@ char *get_user_config_dir(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
snprintf(user_config_dir, len, "%s/.config", home);
|
snprintf(user_config_dir, len, "%s/.config", home);
|
||||||
|
}
|
||||||
|
|
||||||
# endif /* __APPLE__ */
|
# endif /* __APPLE__ */
|
||||||
|
|
||||||
return user_config_dir;
|
return user_config_dir;
|
||||||
|
Loading…
Reference in New Issue
Block a user