summaryrefslogtreecommitdiff
path: root/mysys/my_copy.c
diff options
context:
space:
mode:
authorunknown <dkatz@damien-katzs-computer.local>2007-04-30 17:47:58 -0400
committerunknown <dkatz@damien-katzs-computer.local>2007-04-30 17:47:58 -0400
commit0671a012c5110cfbf3c28a2afb26a47d4ee8b339 (patch)
tree2a2acf9ddf4596a8c100a7da7079861ff5ceb881 /mysys/my_copy.c
parent3a89563ebbe6640b67d63475e6270550f990c2a8 (diff)
parent930912f8324e53d1bad816b26ce880bf63ae58fa (diff)
downloadmariadb-git-0671a012c5110cfbf3c28a2afb26a47d4ee8b339.tar.gz
Merge damien-katzs-computer.local:/Users/dkatz/mysql50
into damien-katzs-computer.local:/Users/dkatz/mysql51 mysys/my_copy.c: Auto merged
Diffstat (limited to 'mysys/my_copy.c')
-rw-r--r--mysys/my_copy.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/mysys/my_copy.c b/mysys/my_copy.c
index 80a68f61b12..3f8b0695a25 100644
--- a/mysys/my_copy.c
+++ b/mysys/my_copy.c
@@ -110,6 +110,11 @@ int my_copy(const char *from, const char *to, myf MyFlags)
err:
if (from_file >= 0) VOID(my_close(from_file,MyFlags));
- if (to_file >= 0) VOID(my_close(to_file,MyFlags));
+ if (to_file >= 0)
+ {
+ VOID(my_close(to_file, MyFlags));
+ /* attempt to delete the to-file we've partially written */
+ VOID(my_delete(to, MyFlags));
+ }
DBUG_RETURN(-1);
} /* my_copy */