Hans Leidekker (@hans) commented about dlls/shell32/shlexec.c:
sei->hProcess = NULL;
- /* remove trailing spaces */
- if (sei_tmp.lpFile)
- {
WCHAR *buf = wcsdup(sei->lpFile), *end = buf + wcslen( buf ) - 1;
while (end >= buf && *end == ' ') *end-- = 0;
sei_tmp.lpFile = buf;
- }
Thanks Louis. Could you also test and handle leading spaces if needed? Also, buf is not freed. I think it would be better to integrate this in the code below that already creates a copy. It should be possible to have just one block where you skip leading/trailing spaces as well as outer quotes, if any.