Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
70b97a98
Commit
70b97a98
authored
Dec 14, 2002
by
monty@mashka.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
On windows, delete any conflicting 'to' files on rename(from,to)
This fixes a bug with REPAIR TABLE t1 USE_FRM on windows.
parent
00e005cb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
mysys/my_rename.c
mysys/my_rename.c
+7
-0
No files found.
mysys/my_rename.c
View file @
70b97a98
...
@@ -46,6 +46,13 @@ int my_rename(const char *from, const char *to, myf MyFlags)
...
@@ -46,6 +46,13 @@ int my_rename(const char *from, const char *to, myf MyFlags)
}
}
#endif
#endif
#if defined(HAVE_RENAME)
#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
))
if
(
rename
(
from
,
to
))
#else
#else
if
(
link
(
from
,
to
)
||
unlink
(
from
))
if
(
link
(
from
,
to
)
||
unlink
(
from
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment