Add migration code for servlist
This commit is contained in:
parent
c38e8fdd14
commit
c99e7f8154
|
@ -1047,6 +1047,17 @@ servlist_load (void)
|
|||
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)
|
||||
return FALSE;
|
||||
|
|
Loading…
Reference in New Issue