diff options
author | David Hill <dhill@conformal.com> | 2014-06-16 11:45:26 -0400 |
---|---|---|
committer | David Hill <dhill@conformal.com> | 2014-06-22 20:39:35 -0400 |
commit | 9d6cd87b0f548aba2094504c6ef71aec69f9d7fb (patch) | |
tree | 1397cb67399b24c9d0213de5d2074bb6ebeab306 /src/irc/dcc/dcc-send.c | |
parent | c26a634fe6f65f44cdd036d2657fe4335ed6e309 (diff) | |
download | irssi-9d6cd87b0f548aba2094504c6ef71aec69f9d7fb.zip |
Replace deprecated g_basename with g_path_get_basename.
Diffstat (limited to 'src/irc/dcc/dcc-send.c')
-rw-r--r-- | src/irc/dcc/dcc-send.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/irc/dcc/dcc-send.c b/src/irc/dcc/dcc-send.c index 930ef770..558fd109 100644 --- a/src/irc/dcc/dcc-send.c +++ b/src/irc/dcc/dcc-send.c @@ -408,19 +408,14 @@ static int dcc_send_one_file(int queue, const char *target, const char *fname, handle = NULL; } - fname = g_basename(fname); + str = g_path_get_basename(fname); /* Replace all the spaces with underscore so that lesser intelligent clients can communicate.. */ - if (!settings_get_bool("dcc_send_replace_space_with_underscore")) - str = NULL; - else { - str = g_strdup(fname); + if (settings_get_bool("dcc_send_replace_space_with_underscore")) g_strdelimit(str, " ", '_'); - fname = str; - } - dcc = dcc_send_create(server, chat, target, fname); + dcc = dcc_send_create(server, chat, target, str); g_free(str); dcc->handle = handle; |