Commit 96f64b44 authored by unknown's avatar unknown

Fixed new bug that caused symlink test to fail


mysys/my_symlink.c:
  More debugging
parent 8f04aaae
......@@ -142,7 +142,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
goto err;
}
/* Don't call realpath() if the name can't be a link */
if (strcmp(name_buff, org_name) ||
if (!strcmp(name_buff, org_name) ||
my_readlink(index_name, org_name, MYF(0)) == -1)
(void) strmov(index_name, org_name);
(void) fn_format(data_name,org_name,"",MI_NAME_DEXT,2+4+16);
......
......@@ -26,9 +26,11 @@
/*
Reads the content of a symbolic link
If the file is not a symbolic link, return the original file name in to.
Returns: 0 if table was a symlink,
1 if table was a normal file
-1 on error.
RETURN
0 If filename was a symlink, (to will be set to value of symlink)
1 If filename was a normal file (to will be set to filename)
-1 on error.
*/
int my_readlink(char *to, const char *filename, myf MyFlags)
......@@ -58,6 +60,7 @@ int my_readlink(char *to, const char *filename, myf MyFlags)
}
else
to[length]=0;
DBUG_PRINT("exit" ,("result: %d", result));
DBUG_RETURN(result);
#endif /* HAVE_READLINK */
}
......
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