← Commit list

82013066a6

Viktor Szakats
Viktor Szakats
2025-11-24
SUCCESS Duration: 219s

Subject

file: do not pass invalid mode flags to `open()` on upload (Windows)

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/file.c+4 -1
@@ -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