Commit 8ec9fdd4 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Fix failing sys_vars.plugin_dir_basic - treat both '/' and '\' as path...

Fix failing sys_vars.plugin_dir_basic - treat both '/' and '\' as path separators in get_relative_path() on Windows
parent c827968a
...@@ -818,12 +818,14 @@ typedef SOCKET_SIZE_TYPE size_socket; ...@@ -818,12 +818,14 @@ typedef SOCKET_SIZE_TYPE size_socket;
#ifdef _WIN32 #ifdef _WIN32
#define FN_LIBCHAR '\\' #define FN_LIBCHAR '\\'
#define FN_LIBCHAR2 '/'
#define FN_ROOTDIR "\\" #define FN_ROOTDIR "\\"
#define FN_DEVCHAR ':' #define FN_DEVCHAR ':'
#define FN_NETWORK_DRIVES /* Uses \\ to indicate network drives */ #define FN_NETWORK_DRIVES /* Uses \\ to indicate network drives */
#define FN_NO_CASE_SENCE /* Files are not case-sensitive */ #define FN_NO_CASE_SENCE /* Files are not case-sensitive */
#else #else
#define FN_LIBCHAR '/' #define FN_LIBCHAR '/'
#define FN_LIBCHAR2 '/'
#define FN_ROOTDIR "/" #define FN_ROOTDIR "/"
#endif #endif
......
...@@ -7681,7 +7681,7 @@ static char *get_relative_path(const char *path) ...@@ -7681,7 +7681,7 @@ static char *get_relative_path(const char *path)
strcmp(DEFAULT_MYSQL_HOME,FN_ROOTDIR)) strcmp(DEFAULT_MYSQL_HOME,FN_ROOTDIR))
{ {
path+=(uint) strlen(DEFAULT_MYSQL_HOME); path+=(uint) strlen(DEFAULT_MYSQL_HOME);
while (*path == FN_LIBCHAR) while (*path == FN_LIBCHAR || *path == FN_LIBCHAR2)
path++; path++;
} }
return (char*) path; return (char*) path;
......
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