Commit 3cba74e0 authored by Sergei Golubchik's avatar Sergei Golubchik

cleanup: fn_format, remove dead code

my_realpath() ignores MY_xxx flags anyway
parent 924a81a5
......@@ -97,13 +97,8 @@ char * fn_format(char * to, const char *name, const char *dir,
pos=strmake(strmov(to,dev),name,length);
(void) strmov(pos,ext); /* Don't convert extension */
}
/*
If MY_RETURN_REAL_PATH and MY_RESOLVE_SYMLINK is given, only do
realpath if the file is a symbolic link
*/
if (flag & MY_RETURN_REAL_PATH)
(void) my_realpath(to, to, MYF(flag & MY_RESOLVE_SYMLINKS ?
MY_RESOLVE_LINK: 0));
(void) my_realpath(to, to, MYF(0));
else if (flag & MY_RESOLVE_SYMLINKS)
{
strmov(buff,to);
......
......@@ -7715,8 +7715,7 @@ int test_if_data_home_dir(const char *dir)
if (!dir)
DBUG_RETURN(0);
(void) fn_format(path, dir, "", "",
(MY_RETURN_REAL_PATH|MY_RESOLVE_SYMLINKS));
(void) fn_format(path, dir, "", "", MY_RETURN_REAL_PATH);
dir_len= strlen(path);
if (mysql_unpacked_real_data_home_len<= dir_len)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment