From c99e7f8154326a1106c0faffe412097e3dfd663f Mon Sep 17 00:00:00 2001 From: TingPing Date: Sat, 23 Mar 2013 17:15:27 -0300 Subject: Add migration code for servlist --- src/common/servlist.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src') diff --git a/src/common/servlist.c b/src/common/servlist.c index 6dbc8f6e..e897b7c3 100644 --- a/src/common/servlist.c +++ b/src/common/servlist.c @@ -1046,6 +1046,17 @@ servlist_load (void) int len; char *tmp; ircnet *net = NULL; + +#ifndef G_OS_WIN32 /* simple migration we will keep for a short while */ + char *oldfile = g_build_filename(get_xdir(), "servlist_.conf", NULL); + char *newfile = g_build_filename(get_xdir(), "servlist.conf", NULL); + + if (g_file_test(oldfile, G_FILE_TEST_EXISTS) && !g_file_test(newfile, G_FILE_TEST_EXISTS)) + g_rename (oldfile, newfile); + + g_free (oldfile); + g_free (newfile); +#endif fp = hexchat_fopen_file ("servlist.conf", "r", 0); if (!fp) -- cgit 1.4.1