mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
Merge mashka.mysql.fi:/home/my/mysql-3.23
into mashka.mysql.fi:/home/my/mysql-4.0 mysys/my_rename.c: Auto merged
This commit is contained in:
commit
68b583d88b
1 changed files with 7 additions and 0 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue