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 | 68b583d88b186c4384571550a2564543bc1bf840 (patch) | |
tree | d25696684b36d65707752933d70e56c7bebadb94 /mysys/my_rename.c | |
parent | f66adf2b891100a9ae609ef41322177404a6dac4 (diff) | |
parent | 0c8582b3c3691aedd72812721b6c6e83fc5256d8 (diff) | |
download | mariadb-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.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)) |