Use ~/.config/grafx2 when the XDG_CONFIG_HOME is not set

Follow the freedesktop spec.

Thanks to skrzyp for noting this important detail.
This commit is contained in:
Adrien Destugues 2017-05-08 09:43:47 +02:00
parent a321c4c785
commit f80bb320bc

View File

@ -218,8 +218,7 @@ void Set_config_directory(const char * program_dir, char * config_dir)
if (config_parent_dir)
Config_SubDir = "grafx2";
else {
// "~/.grafx2"
const char* Config_SubDir = ".grafx2";
Config_SubDir = ".config/grafx2";
config_parent_dir = getenv("HOME");
}
#endif