mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 10:14:19 +01:00
Ensure that mysql_home ends in FN_LIBCHAR after realpath()
This commit is contained in:
parent
e61e1c8f34
commit
e087434c10
1 changed files with 9 additions and 1 deletions
|
@ -4472,9 +4472,17 @@ fn_format_relative_to_data_home(my_string to, const char *name,
|
|||
|
||||
static void fix_paths(void)
|
||||
{
|
||||
char buff[FN_REFLEN];
|
||||
char buff[FN_REFLEN],*pos;
|
||||
convert_dirname(mysql_home,mysql_home,NullS);
|
||||
/* Resolve symlinks to allow 'mysql_home' to be a relative symlink */
|
||||
my_realpath(mysql_home,mysql_home,MYF(0));
|
||||
/* Ensure that mysql_home ends in FN_LIBCHAR */
|
||||
pos=strend(mysql_home);
|
||||
if (pos[-1] != FN_LIBCHAR)
|
||||
{
|
||||
pos[0]= FN_LIBCHAR;
|
||||
pos[1]= 0;
|
||||
}
|
||||
convert_dirname(mysql_real_data_home,mysql_real_data_home,NullS);
|
||||
convert_dirname(language,language,NullS);
|
||||
(void) my_load_path(mysql_home,mysql_home,""); // Resolve current dir
|
||||
|
|
Loading…
Add table
Reference in a new issue