https://bugs.winehq.org/show_bug.cgi?id=47790
Jeff Smith whydoubt@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |whydoubt@gmail.com
--- Comment #2 from Jeff Smith whydoubt@gmail.com --- This seems to result from the intersection of two issues.
1st is how the raw command line is altered by the wine loader If 'putty.exe' is entered at the command line (or 'wine64 putty.exe' for wine), GetCommandLineA() returns... - Windows cmd: 'putty.exe' - Windows powershell: '"C:\Users\Jeff\Téléchargements\putty.exe"' - wine: 'Z:\home\jeff\Téléchargements\putty.exe'
2nd is how the first argument of the command line is stripped out and passed into WinMain. I am not sure if mingw is used to compile putty for release, but the behaviour does match mingw in that characters >0x7f (along with characters <= 0x20) not contained in quotes are treated as the end of the first arg. What gets delivered to WinMain: Windows cmd: '' Windows powershell: '' wine: 'léchargements\putty.exe'
So when run with wine, putty is effectively passed 'léchargements\putty.exe' as a command-line argument. Then putty attempts to treat it as a host name, leading to the warning message box.
Note that with #2, an offending character _anywhere_ in the command name provided to Windows cmd will cause essentially the same failure.