diff options
author | Vladislav Vaintroub <wlad@montyprogram.com> | 2012-12-21 14:04:25 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@montyprogram.com> | 2012-12-21 14:04:25 +0100 |
commit | 77b4290b28bc01b5838662ee511e33b0dfc32714 (patch) | |
tree | 7d21e23a0265c612a9e6e3ef2e8bf4f6c84abfe8 /mysys | |
parent | 532d9c30283db4a35d92e40f3df9f4e7f86d45c6 (diff) | |
parent | c4b35f92798f8612edc2d197ecf8a283a9269436 (diff) | |
download | mariadb-git-77b4290b28bc01b5838662ee511e33b0dfc32714.tar.gz |
merge
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/my_redel.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/mysys/my_redel.c b/mysys/my_redel.c index e06511542a3..b048c24d942 100644 --- a/mysys/my_redel.c +++ b/mysys/my_redel.c @@ -89,15 +89,11 @@ end: int my_copystat(const char *from, const char *to, int MyFlags) { - struct stat statbuf; + MY_STAT statbuf; - if (stat(from, &statbuf)) - { - my_errno=errno; - if (MyFlags & (MY_FAE+MY_WME)) - my_error(EE_STAT, MYF(ME_BELL+ME_WAITTANG),from,errno); + if (my_stat(from, &statbuf, MyFlags) == NULL) return -1; /* Can't get stat on input file */ - } + if ((statbuf.st_mode & S_IFMT) != S_IFREG) return 1; |