diff finch/finch.c @ 16483:5e47b3427b28

propagate from branch 'im.pidgin.rlaager.gaim_migration' (head dcc40d46afbe3f87cc674e4fb1526ac722bc35cb) to branch 'im.pidgin.pidgin' (head 0ef5b6c44115778e329fd628324124f872f5253b)
author Sean Egan <seanegan@gmail.com>
date Fri, 27 Apr 2007 02:14:44 +0000
parents 4999bbc52881 6c97924af83b
children 2da3e5a69ebc
line wrap: on
line diff
--- a/finch/finch.c	Fri Apr 27 00:28:21 2007 +0000
+++ b/finch/finch.c	Fri Apr 27 02:14:44 2007 +0000
@@ -272,9 +272,32 @@
 	 * Fire up this baby.
 	 */
 
-	/* Because we don't want debug-messages to show up and corrup the display */
+	/* We don't want debug-messages to show up and corrupt the display */
 	purple_debug_set_enabled(debug_enabled);
 
+	/* If we're using a custom configuration directory, we
+	 * do NOT want to migrate, or weird things will happen. */
+	if (opt_config_dir_arg == NULL)
+	{
+		if (!purple_core_migrate())
+		{
+			char *old = g_strconcat(purple_home_dir(),
+			                        G_DIR_SEPARATOR_S ".gaim", NULL);
+			char *text = g_strdup_printf(_(
+				"%s encountered errors migrating your settings "
+				"from %s to %s. Please investigate and complete the "
+				"migration by hand."), _("Finch"),
+				old, purple_user_dir());
+
+			g_free(old);
+
+			purple_print_utf8_to_console(stderr, text);
+			g_free(text);
+
+			return 0;
+		}
+	}
+
 	purple_core_set_ui_ops(gnt_core_get_ui_ops());
 	purple_eventloop_set_ui_ops(gnt_eventloop_get_ui_ops());
 	purple_idle_set_ui_ops(finch_idle_get_ui_ops());