GKeyFile: Deal better with blank lines
authorMatthias Clasen <mclasen@redhat.com>
Fri, 15 Jun 2012 22:53:09 +0000 (18:53 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 15 Jun 2012 22:53:09 +0000 (18:53 -0400)
commitdefa25f3d00619947720be0bcda2357bd43e718f
tree2b3eb0c4f03a02a82f137f9cff289d4bf60740d9
parentd0c8895a073625ce87bf1604b9ab72cc7e15c616
GKeyFile: Deal better with blank lines

There is no need to store a has_trailing_blank_line boolean for
each group, we can just check this at the time we assemble the data.

This fixes a problem without roundtrips where we would sometimes
add an extra blank line between groups.

The testcase here is inspired by
https://bugzilla.gnome.org/show_bug.cgi?id=677817
glib/gkeyfile.c
glib/tests/keyfile.c