After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 476852 - Invocation of the interface "g_key_file_remove_comment" does not remove comment in specific case
Invocation of the interface "g_key_file_remove_comment" does not remove comme...
Status: RESOLVED OBSOLETE
Product: glib
Classification: Platform
Component: gkeyfile
2.14.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2007-09-14 10:04 UTC by Areg Beketovski
Modified: 2018-05-24 11:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The test case reproducing the bug (872 bytes, text/plain)
2007-09-14 10:05 UTC, Areg Beketovski
Details

Description Areg Beketovski 2007-09-14 10:04:59 UTC
Please describe the problem:
Invocation of the interface g_key_file_remove_comment with parameters group_name = "some_group", key = "NULL" does not remove comment above the group. This is caused by duality of the comment structure. In implementation of the "g_key_file_set_comment" interface used "comment" field of the structure, but when loading from file or data then the parsing used "NULL" key in the map.

Steps to reproduce:
   1. Load a key file from data.
   2. Call g_key_file_remove_comment with group "group_name" = "Second Group"(existing group in the key file), "key" = NULL. The correct behaviour is to remove the comment above the "Second Group" group, which contains "Third Comment" text.
   3. Call g_key_file_get_comment with same parameters. If the comment is removed by the previous call the g_key_file_get_comment returns NULL. Otherwise the g_key_file_get_comment returns a text of the comment that demonstrates incorrect behaviour of the g_key_file_remove_comment.

 



Actual results:
"g_key_file_get_comment" returns the text of the comment.

Expected results:
The NULL should be returned when calling "g_key_file_get_comment".

Does this happen every time?
Yes

Other information:
The detailed bug description can be found at: 

http://linuxtesting.org/results/report?num=D0027
Comment 1 Areg Beketovski 2007-09-14 10:05:55 UTC
Created attachment 95582 [details]
The test case reproducing the bug
Comment 2 GNOME Infrastructure Team 2018-05-24 11:05:46 UTC
-- 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/104.