1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

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 a7696c7343 (shipped in 7.75.0)
Reported-by: Johannes Lesr
Fixes #6657
Closes #6666
This commit is contained in:
Daniel Stenberg 2021-02-26 11:18:09 +01:00
parent 15bc86df33
commit 40f3c18e6a
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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)