summaryrefslogtreecommitdiff
path: root/libs/libcurl/src/rename.c
diff options
context:
space:
mode:
authordartraiden <wowemuh@gmail.com>2025-04-21 09:33:29 +0300
committerdartraiden <wowemuh@gmail.com>2025-04-21 09:50:38 +0300
commitcf6ba06cd445f1f4554701637d5bab581acfba98 (patch)
tree0d9b618df1c8f888cb37221be0590f4a677fe477 /libs/libcurl/src/rename.c
parent842ec200cd37ae05f2a9c56f2a4040088d2ac917 (diff)
libcurl: update to 8.13.0
Diffstat (limited to 'libs/libcurl/src/rename.c')
-rw-r--r--libs/libcurl/src/rename.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/libcurl/src/rename.c b/libs/libcurl/src/rename.c
index a35f6ce76e..89eab2e057 100644
--- a/libs/libcurl/src/rename.c
+++ b/libs/libcurl/src/rename.c
@@ -40,14 +40,14 @@
/* return 0 on success, 1 on error */
int Curl_rename(const char *oldpath, const char *newpath)
{
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(UNDER_CE)
/* rename() on Windows does not overwrite, so we cannot use it here.
MoveFileEx() will overwrite and is usually atomic, however it fails
when there are open handles to the file. */
const int max_wait_ms = 1000;
struct curltime start = Curl_now();
- TCHAR *tchar_oldpath = curlx_convert_UTF8_to_tchar((char *)oldpath);
- TCHAR *tchar_newpath = curlx_convert_UTF8_to_tchar((char *)newpath);
+ TCHAR *tchar_oldpath = curlx_convert_UTF8_to_tchar(oldpath);
+ TCHAR *tchar_newpath = curlx_convert_UTF8_to_tchar(newpath);
for(;;) {
timediff_t diff;
if(MoveFileEx(tchar_oldpath, tchar_newpath, MOVEFILE_REPLACE_EXISTING)) {