summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-02-26 11:18:09 +0100
committerDaniel Stenberg <daniel@haxx.se>2021-02-26 11:20:45 +0100
commitbaff92db3f5a483884c9a8e2e7ae94aed58af4f8 (patch)
treecb8bfabcf988294ddde47bc37a53432e808a0046
parent09a5bff1c9cb9c305ac18f5c4f1f6233badcd8b4 (diff)
downloadcurl-bagder/set-new-file-perms.tar.gz
curl: set CURLOPT_NEW_FILE_PERMS if requestedbagder/set-new-file-perms
The --create-file-mode code logic accepted the value but never actually passed it on to libcurl! Follow-up to a7696c73436f (shipped in 7.75.0) Reported-by: Johannes Lesr Fixes #6657
-rw-r--r--src/tool_operate.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c
index e2b287269..b387ef9f6 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -2001,6 +2001,9 @@ static CURLcode single_transfer(struct GlobalConfig *global,
if(config->ftp_pret)
my_setopt(curl, CURLOPT_FTP_USE_PRET, 1L);
+ if(config->create_file_mode)
+ my_setopt(curl, CURLOPT_NEW_FILE_PERMS, config->create_file_mode);
+
if(config->proto_present)
my_setopt_flags(curl, CURLOPT_PROTOCOLS, config->proto);
if(config->proto_redir_present)