Fix Issue#230: use the user's config directory
It is a simple fix to enable compliance with the XDG Base Directory Specification.
First of all, to respond to the question commented within create_user_dirs
: "HB: it this really a reason to exit the program on *nix ?" The answer is no. There really isn't a reason to exit the program in this case. The default configuration will be used, so just warning that the per-user configuration directory couldn't be created is sufficient. Simply use dia_config_filename (NULL)
to get the configuration directory path on any platform.
Then, within that function, call g_get_user_config_dir
instead of g_get_home_dir
.