summaryrefslogtreecommitdiff
path: root/src/irc/dcc/dcc-send.c
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/irc/dcc/dcc-send.c
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/irc/dcc/dcc-send.c')
-rw-r--r--src/irc/dcc/dcc-send.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/irc/dcc/dcc-send.c b/src/irc/dcc/dcc-send.c
index 4b5943ad..9d312e13 100644
--- a/src/irc/dcc/dcc-send.c
+++ b/src/irc/dcc/dcc-send.c
@@ -155,7 +155,8 @@ static char *dcc_send_get_file(const char *fname)
g_free(str);
path = convert_home(settings_get_str("dcc_upload_path"));
- str = g_strconcat(path, G_DIR_SEPARATOR_S, fname, NULL);
+ str = *path == '\0' ? g_strdup(fname) :
+ g_strconcat(path, G_DIR_SEPARATOR_S, fname, NULL);
g_free(path);
}