G_KEY_FILE_KEEP_COMMENTS adds extra newlines



Hi everyone

Is there a known bug in g_key_file_load_from_data () with the
G_KEY_FILE_KEEP_COMMENTS flag? It seems to add extra newlines every time
the g_key_file_to_data () converts the GKeyFile back to a string, even
when no comments exist in the keyfile.

When this is saved back to an rc file, upon multiple invocations of the
program the length of the rc file grows with large gaps of newlines
between [groups].

Turning off the G_KEY_FILE_KEEP_COMMENTS flag makes it work properly,
but this means that any comments added by a user / program aren't saved.



Kind regards,

Mukund


-- 
Banu -- Free software science and engineering
http://www.banu.com/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]