diff options
author | unknown <monty@mashka.mysql.fi> | 2002-12-14 13:02:30 +0200 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2002-12-14 13:02:30 +0200 |
commit | 41f106cbd426e95ea1f5718cce4d1cbb54cee79d (patch) | |
tree | d25696684b36d65707752933d70e56c7bebadb94 /mysys/my_rename.c | |
parent | d2348a8e82bac5f6b8111e428f5a0fc3d3f9bc55 (diff) | |
parent | 2aebb2a16e42f0fd53d47e15d25bc38267c840b3 (diff) | |
download | mariadb-git-41f106cbd426e95ea1f5718cce4d1cbb54cee79d.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.c | 7 |
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)) |