[Xfce4-commits] <xfce4-panel:master> Empty channel if 4.6 migration failed.
Nick Schermer
noreply at xfce.org
Sun Apr 18 18:32:02 CEST 2010
Updating branch refs/heads/master
to 1cb46cb53d06ff42624e70c6d76253ea57e58364 (commit)
from ae14d9374189bb73dc05e9623877de4cfb757744 (commit)
commit 1cb46cb53d06ff42624e70c6d76253ea57e58364
Author: Nick Schermer <nick at xfce.org>
Date: Sun Apr 18 18:11:55 2010 +0200
Empty channel if 4.6 migration failed.
migrate/migrate-46.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/migrate/migrate-46.c b/migrate/migrate-46.c
index 2ea7346..ac7ba29 100644
--- a/migrate/migrate-46.c
+++ b/migrate/migrate-46.c
@@ -909,6 +909,10 @@ migrate_46 (const gchar *filename,
succeed = TRUE;
}
+ /* if parsing failed somehow, empty the channel so no broken config is left */
+ if (!succeed)
+ xfconf_channel_reset_property (parser->channel, "/", TRUE);
+
g_free (contents);
g_markup_parse_context_free (context);
g_object_unref (G_OBJECT (parser->channel));
More information about the Xfce4-commits
mailing list