summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-11-26 14:51:48 +0200
committerGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-11-26 14:51:48 +0200
commitdb8bd7beb83e513870b16ea95381018a48a4079d (patch)
treec48ad0e6cae3c6805e0e56810c191edf4210919f /mysys
parent01e0be66ddb4e404ab7ae1e218996d57655635ed (diff)
parentb7e69aef10867289cfd09f3fa8ed41c296ca8647 (diff)
downloadmariadb-git-db8bd7beb83e513870b16ea95381018a48a4079d.tar.gz
merge
Diffstat (limited to 'mysys')
-rw-r--r--mysys/my_symlink.c17
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
}