GNOME Bugzilla – Bug 666456
Not clearly documented behavior of g_key_file_set_comment function.
Last modified: 2018-05-24 13:37:31 UTC
Created attachment 203798 [details] IRC conversation about the problem Hi, I am new to Glib developing and to bugtrack platform. I am also not being a native english speaker. Please excuse me for this in advance. So, I've tried to use GKeyFile component. Using g_key_file_set_string passing an unexisting group name do create the group whereas using g_key_file_set_comment doesn't. Though that the documentation has a lack of clarity about that. (It should be tested with others g_key_file_set* functions). I hope I've been clear. Thanks alot for your work !
Sure enough, in g_key_file_set_group_comment(), which is eventually called by g_key_file_set_comment(), there is a check, using g_key_file_lookup_group(), which errors out early if the group name does not exist: http://git.gnome.org/browse/glib/tree/glib/gkeyfile.c#n3139
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/490.