summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2006-11-14 19:54:56 +0000
committerSebastien Helleu <flashcode@flashtux.org>2006-11-14 19:54:56 +0000
commit7d29001f9dcab073f7265ebfb3c44a37ddb0f986 (patch)
treeeb44d0e2532c402cfdb66468e8da18254127aa8b /src
parent3e4db5f7c140f5127dd575f52df5f23179ad6087 (diff)
downloadweechat-7d29001f9dcab073f7265ebfb3c44a37ddb0f986.zip
Fixed bug with DCC SEND when filename begins with '~'
Diffstat (limited to 'src')
-rw-r--r--src/irc/irc-dcc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/irc/irc-dcc.c b/src/irc/irc-dcc.c
index be2e593e8..087ebf419 100644
--- a/src/irc/irc-dcc.c
+++ b/src/irc/irc-dcc.c
@@ -958,12 +958,14 @@ dcc_send_request (t_irc_server *server, int type, char *nick, char *filename)
if (type == DCC_FILE_SEND)
{
- /* add home if filename not beginning with '/' (not for Win32) */
+ /* add home if filename not beginning with '/' or '~' (not for Win32) */
#ifdef _WIN32
filename2 = strdup (filename);
#else
if (filename[0] == '/')
filename2 = strdup (filename);
+ else if (filename[0] == '~')
+ filename2 = weechat_strreplace (filename, "~", getenv ("HOME"));
else
{
dir1 = weechat_strreplace (cfg_dcc_upload_path, "~", getenv ("HOME"));