wince: replace _wrename by MoveFileW
authorGeoffroy Couprie <geo.couprie@gmail.com>
Wed, 13 May 2009 14:50:53 +0000 (16:50 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 14 May 2009 18:18:33 +0000 (20:18 +0200)
(cherry picked from commit 7ba508f8ef84047d1c1ed06ac0f3596e0ea1019d)

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
src/text/filesystem.c

index 7b93beb..bc602ae 100644 (file)
@@ -463,7 +463,15 @@ int utf8_rename (const char *oldpath, const char *newpath)
 #if defined (WIN32)
     CONVERT_PATH (oldpath, wold, -1);
     CONVERT_PATH (newpath, wnew, -1);
+# ifdef UNDER_CE
+    /* FIXME: errno support */
+    if (MoveFileW (wold, wnew))
+        return 0;
+    else
+        return -1;
+#else
     return _wrename (wold, wnew);
+#endif
 
 #endif
     const char *lo = ToLocale (oldpath);