summaryrefslogtreecommitdiff
path: root/src/irc/dcc/dcc-get.c
diff options
context:
space:
mode:
authorDavid Hill <dhill@conformal.com>2014-06-16 11:45:26 -0400
committerDavid Hill <dhill@conformal.com>2014-06-22 20:39:35 -0400
commit9d6cd87b0f548aba2094504c6ef71aec69f9d7fb (patch)
tree1397cb67399b24c9d0213de5d2074bb6ebeab306 /src/irc/dcc/dcc-get.c
parentc26a634fe6f65f44cdd036d2657fe4335ed6e309 (diff)
downloadirssi-9d6cd87b0f548aba2094504c6ef71aec69f9d7fb.zip
Replace deprecated g_basename with g_path_get_basename.
Diffstat (limited to 'src/irc/dcc/dcc-get.c')
-rw-r--r--src/irc/dcc/dcc-get.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/irc/dcc/dcc-get.c b/src/irc/dcc/dcc-get.c
index 3c88ff24..8eee81b3 100644
--- a/src/irc/dcc/dcc-get.c
+++ b/src/irc/dcc/dcc-get.c
@@ -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;
}