eric pouech (@epo) commented about programs/start/start.c:
usage(); } else opts.sei.lpDirectory = argv[++i]; + + if (opts.sei.lpDirectory[0] == '\"') + { + int len = wcslen(opts.sei.lpDirectory); + /* no need to free since the process will exit shortly */ + WCHAR* lpDirectory = wcsdup(opts.sei.lpDirectory); + if (lpDirectory[len - 1] == '\"') + lpDirectory[len - 1] = 0; + else + WINE_ERR("quotes does not match!\n");
that should be a proper error message not a WINE\_\* message (and probably setting start.exe exit code) note: native start.exe prints an error message if the directory passed in /d isn't a valid one... and the same as the one I get when there's no trailing " so probably, the simplest solution is to remove quotes when leading & trailing are present, and fail if resulting directory doesn't exist -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9946#note_128105