mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Bug #43005 main.init_connect fais on Windows in PB2
Server args containing spaces do not work on Windows Fixed my_safe_rprocess-win to re-apply "" around such args
This commit is contained in:
@ -188,7 +188,14 @@ int main(int argc, const char** argv )
|
||||
die("No real args -> nothing to do");
|
||||
/* Copy the remaining args to child_arg */
|
||||
for (int j= i+1; j < argc; j++) {
|
||||
to+= _snprintf(to, child_args + sizeof(child_args) - to, "%s ", argv[j]);
|
||||
if (strchr (argv[j], ' ')) {
|
||||
/* Protect with "" if this arg contains a space */
|
||||
to+= _snprintf(to, child_args + sizeof(child_args) - to,
|
||||
"\"%s\" ", argv[j]);
|
||||
} else {
|
||||
to+= _snprintf(to, child_args + sizeof(child_args) - to,
|
||||
"%s ", argv[j]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user