diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-02-26 11:18:09 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-02-27 00:30:36 +0100 |
commit | 40f3c18e6af7c6e06328062645bda8fa0302d715 (patch) | |
tree | 133136aa712e434d18b347a81861d9876e37373f /src | |
parent | 15bc86df3361bb890cdee9936c72b5f558b3d978 (diff) | |
download | curl-40f3c18e6af7c6e06328062645bda8fa0302d715.tar.gz |
curl: set CURLOPT_NEW_FILE_PERMS if requested
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
Closes #6666
Diffstat (limited to 'src')
-rw-r--r-- | src/tool_operate.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c index f36f3ce53..2aebb9ac2 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) |