summaryrefslogtreecommitdiffstats
path: root/apps/apps.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/apps.c')
-rw-r--r--apps/apps.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/apps.c b/apps/apps.c
index d3d601d9ed..f9cc27052b 100644
--- a/apps/apps.c
+++ b/apps/apps.c
@@ -218,10 +218,16 @@ void program_name(char *in, char *out, int size)
#ifdef WIN32
int WIN32_rename(char *from, char *to)
{
+#ifdef WINNT
int ret;
+/* Note: MoveFileEx() doesn't work under Win95, Win98 */
ret=MoveFileEx(from,to,MOVEFILE_REPLACE_EXISTING|MOVEFILE_COPY_ALLOWED);
return(ret?0:-1);
+#else
+ unlink(to);
+ return MoveFile(from, to);
+#endif
}
#endif