mirror of
https://github.com/curl/curl.git
synced 2026-07-24 13:57:16 +03:00
file: do not pass invalid mode flags to open() on upload (Windows)
Ref: https://learn.microsoft.com/cpp/c-runtime-library/reference/open-wopen Ref: #19645 Cherry-picked from #19643 Closes #19647
This commit is contained in:
parent
537987d8c6
commit
82013066a6
1 changed files with 4 additions and 1 deletions
|
|
@ -343,7 +343,10 @@ static CURLcode file_upload(struct Curl_easy *data,
|
|||
else
|
||||
mode |= O_TRUNC;
|
||||
|
||||
#if (defined(ANDROID) || defined(__ANDROID__)) && \
|
||||
#ifdef _WIN32
|
||||
fd = curlx_open(file->path, mode,
|
||||
data->set.new_file_perms & (_S_IREAD | _S_IWRITE));
|
||||
#elif (defined(ANDROID) || defined(__ANDROID__)) && \
|
||||
(defined(__i386__) || defined(__arm__))
|
||||
fd = curlx_open(file->path, mode, (mode_t)data->set.new_file_perms);
|
||||
#else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue