From 99998793d5249477d2b830b834aa12d2a2061fca Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 14 Jun 2006 13:48:27 +0000 Subject: [PATCH] Fix 344868 --- ChangeLog | 5 +++++ ChangeLog.pre-2-12 | 5 +++++ glib/gkeyfile.c | 4 ++++ 3 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index 4475597..27168c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-06-14 Matthias Clasen + + * glib/gkeyfile.c (g_key_file_to_data): Separate groups by + an empty line (#344868, Christian Persch) + 2006-06-14 Tor Lillqvist * glib/gutils.c (g_listenv): Add Windows notes to doc comment. diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 4475597..27168c5 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,8 @@ +2006-06-14 Matthias Clasen + + * glib/gkeyfile.c (g_key_file_to_data): Separate groups by + an empty line (#344868, Christian Persch) + 2006-06-14 Tor Lillqvist * glib/gutils.c (g_listenv): Add Windows notes to doc comment. diff --git a/glib/gkeyfile.c b/glib/gkeyfile.c index 0e3dddc..0f27df9 100644 --- a/glib/gkeyfile.c +++ b/glib/gkeyfile.c @@ -943,6 +943,10 @@ g_key_file_to_data (GKeyFile *key_file, group = (GKeyFileGroup *) group_node->data; + /* separate groups by an empty line */ + if (group_node->next) + g_string_append_c (data_string, '\n'); + if (group->comment != NULL) g_string_append_printf (data_string, "%s\n", group->comment->value); if (group->name != NULL) -- 2.7.4