1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-08 02:33:12 +02:00

Fixed bug with DCC SEND when filename begins with '~'

This commit is contained in:
Sebastien Helleu
2006-11-14 19:54:56 +00:00
parent 3e4db5f7c1
commit 7d29001f9d
4 changed files with 10 additions and 4 deletions
+3 -1
View File
@@ -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"));