Replace deprecated g_basename with g_path_get_basename.

This commit is contained in:
David Hill 2014-06-16 11:45:26 -04:00
commit 9d6cd87b0f
5 changed files with 16 additions and 15 deletions

View file

@ -55,10 +55,13 @@ static void sig_dcc_destroyed(GET_DCC_REC *dcc)
char *dcc_get_download_path(const char *fname)
{
char *str, *downpath;
char *base;
base = g_path_get_basename(fname);
downpath = convert_home(settings_get_str("dcc_download_path"));
str = g_strconcat(downpath, G_DIR_SEPARATOR_S, g_basename(fname), NULL);
str = g_strconcat(downpath, G_DIR_SEPARATOR_S, base, NULL);
g_free(downpath);
g_free(base);
return str;
}