From db85ab7c90f23e00cd444728f6a5b3d1f63254df Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Tue, 21 Feb 2017 15:17:37 +0100 Subject: [PATCH] Quote the filename when dcc requests are auto accepted. PR #453 forces the user to quote the filenames given to /DCC commands when they contain spaces but the autoget functionality didn't get updated so the filename was always passed without quotes. Closes #656. --- src/irc/dcc/dcc-autoget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/irc/dcc/dcc-autoget.c b/src/irc/dcc/dcc-autoget.c index de23a5d1..995b3e04 100644 --- a/src/irc/dcc/dcc-autoget.c +++ b/src/irc/dcc/dcc-autoget.c @@ -70,7 +70,7 @@ static void sig_dcc_request(GET_DCC_REC *dcc, const char *nickaddr) file = dcc_get_download_path(dcc->arg); str = g_strdup_printf(settings_get_bool("dcc_autoresume") && stat(file, &statbuf) == 0 ? - "RESUME %s %s" : "GET %s %s", + "RESUME %s \"%s\"" : "GET %s \"%s\"", dcc->nick, dcc->arg); signal_emit("command dcc", 2, str, dcc->server); g_free(file);