diff options
author | Alexey Botchkov <holyfoot@mysql.com> | 2008-08-26 14:31:17 +0500 |
---|---|---|
committer | Alexey Botchkov <holyfoot@mysql.com> | 2008-08-26 14:31:17 +0500 |
commit | 0804f8b5fbd6afa823638ae95440a933e371a090 (patch) | |
tree | e486b05bb9f3e200ea0cc7531c47d3e5f845a356 /mysys | |
parent | 54a2d225ff8b2ba754655bf9c25310d7b7f2378c (diff) | |
parent | e180ea955397368c86e0db527cb54956b8207933 (diff) | |
download | mariadb-git-0804f8b5fbd6afa823638ae95440a933e371a090.tar.gz |
merging fixes
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/my_symlink.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mysys/my_symlink.c b/mysys/my_symlink.c index 69ce91ada5b..f8c6ebf02c3 100644 --- a/mysys/my_symlink.c +++ b/mysys/my_symlink.c @@ -111,8 +111,16 @@ int my_symlink(const char *content, const char *linkname, myf MyFlags) int my_is_symlink(const char *filename __attribute__((unused))) { +#if defined (HAVE_LSTAT) && defined (S_ISLNK) struct stat stat_buff; return !lstat(filename, &stat_buff) && S_ISLNK(stat_buff.st_mode); +#elif defined (_WIN32) + DWORD dwAttr = GetFileAttributes(filename); + return (dwAttr != INVALID_FILE_ATTRIBUTES) && + (dwAttr & FILE_ATTRIBUTE_REPARSE_POINT); +#else /* No symlinks */ + return 0; +#endif } |