summaryrefslogtreecommitdiff
path: root/src/fe-common/irc/dcc
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-11-19 02:46:26 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-11-19 02:46:26 +0000
commit65c9a361aba0a1b11ccf8e651522e0b0f94a8710 (patch)
treeba86da0d17ae96a3614cf5d534def5464cbe08f6 /src/fe-common/irc/dcc
parentb3c0778dc45415f1c42be17a8c452b0ab7316920 (diff)
downloadirssi-65c9a361aba0a1b11ccf8e651522e0b0f94a8710.zip
If /SET dcc_upload_path is empty, we should use the current directory, not
root directory. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2074 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/irc/dcc')
-rw-r--r--src/fe-common/irc/dcc/fe-dcc-send.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/fe-common/irc/dcc/fe-dcc-send.c b/src/fe-common/irc/dcc/fe-dcc-send.c
index ecaa3f68..6ec49ed8 100644
--- a/src/fe-common/irc/dcc/fe-dcc-send.c
+++ b/src/fe-common/irc/dcc/fe-dcc-send.c
@@ -113,9 +113,13 @@ static void sig_dcc_send_complete(GList **list, WINDOW_REC *window,
return;
/* completing filename parameter for /DCC SEND */
- path = convert_home(settings_get_str("dcc_upload_path"));
+ path = convert_home(settings_get_str("dcc_upload_path"));
+ if (*path == '\0') {
+ /* use the default path */
+ g_free_and_null(path);
+ }
+
*list = filename_complete(word, path);
- g_free(path);
if (*list != NULL) {
*want_space = FALSE;