diff options
author | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-11-26 14:51:48 +0200 |
---|---|---|
committer | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-11-26 14:51:48 +0200 |
commit | db8bd7beb83e513870b16ea95381018a48a4079d (patch) | |
tree | c48ad0e6cae3c6805e0e56810c191edf4210919f /mysys | |
parent | 01e0be66ddb4e404ab7ae1e218996d57655635ed (diff) | |
parent | b7e69aef10867289cfd09f3fa8ed41c296ca8647 (diff) | |
download | mariadb-git-db8bd7beb83e513870b16ea95381018a48a4079d.tar.gz |
merge
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/my_symlink.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/mysys/my_symlink.c b/mysys/my_symlink.c index 258e227bb7b..b57edd2179a 100644 --- a/mysys/my_symlink.c +++ b/mysys/my_symlink.c @@ -113,7 +113,6 @@ int my_is_symlink(const char *filename __attribute__((unused))) #endif } - /* Resolve all symbolic links in path 'to' may be equal to 'filename' @@ -147,7 +146,23 @@ int my_realpath(char *to, const char *filename, } DBUG_RETURN(result); #else +#ifdef _WIN32 + int ret= GetFullPathName(filename,FN_REFLEN,
+ to,
+ NULL); + if (ret == 0 || ret > FN_REFLEN) + { + if (ret > FN_REFLEN) + my_errno= ENAMETOOLONG; + else + my_errno= EACCES; + if (MyFlags & MY_WME) + my_error(EE_REALPATH, MYF(0), filename, my_errno); + return -1; + } +#else my_load_path(to, filename, NullS); +#endif return 0; #endif } |