summaryrefslogtreecommitdiff
path: root/mysys/my_rename.c
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2002-12-14 13:02:30 +0200
committerunknown <monty@mashka.mysql.fi>2002-12-14 13:02:30 +0200
commit68b583d88b186c4384571550a2564543bc1bf840 (patch)
treed25696684b36d65707752933d70e56c7bebadb94 /mysys/my_rename.c
parentf66adf2b891100a9ae609ef41322177404a6dac4 (diff)
parent0c8582b3c3691aedd72812721b6c6e83fc5256d8 (diff)
downloadmariadb-git-68b583d88b186c4384571550a2564543bc1bf840.tar.gz
Merge mashka.mysql.fi:/home/my/mysql-3.23
into mashka.mysql.fi:/home/my/mysql-4.0 mysys/my_rename.c: Auto merged
Diffstat (limited to 'mysys/my_rename.c')
-rw-r--r--mysys/my_rename.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mysys/my_rename.c b/mysys/my_rename.c
index fde45eba456..d4f99e83247 100644
--- a/mysys/my_rename.c
+++ b/mysys/my_rename.c
@@ -45,6 +45,13 @@ int my_rename(const char *from, const char *to, myf MyFlags)
}
#endif
#if defined(HAVE_RENAME)
+#ifdef __WIN__
+ /*
+ On windows we can't rename over an existing file:
+ Remove any conflicting files:
+ */
+ (void) my_delete(to, MYF(0));
+#endif
if (rename(from,to))
#else
if (link(from, to) || unlink(from))