diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2018-07-25 22:24:40 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2018-07-25 22:24:40 +0200 |
commit | cb5952b5060d089c021808fe1f1cf13f7eb88423 (patch) | |
tree | 1e4678bd3b899428428b4f7980b92fade8e57f62 /mysys | |
parent | 57cde8ccd19675dc98e3cbacf0ef5c72cb188e49 (diff) | |
parent | 9fbe360e9f7d41d169eb5abed22dc15f26f6c749 (diff) | |
download | mariadb-git-cb5952b5060d089c021808fe1f1cf13f7eb88423.tar.gz |
Merge branch '10.0' into bb-10.1-merge-sanja
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/my_rename.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mysys/my_rename.c b/mysys/my_rename.c index 09e7eafa980..17f693629a8 100644 --- a/mysys/my_rename.c +++ b/mysys/my_rename.c @@ -39,7 +39,10 @@ int my_rename(const char *from, const char *to, myf MyFlags) if (link(from, to) || unlink(from)) { #endif - my_errno=errno; + if (errno == ENOENT && !access(from, F_OK)) + my_errno= ENOTDIR; + else + my_errno= errno; error = -1; if (MyFlags & (MY_FAE+MY_WME)) my_error(EE_LINK, MYF(ME_BELL+ME_WAITTANG),from,to,my_errno); |