https://bugs.winehq.org/show_bug.cgi?id=49811
Bug ID: 49811 Summary: cmd /c "cd "directory"&&"somecommand.exe"" tries to cd to "directory"&&"somecommand.exe" Product: Wine Version: 5.16 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: cmd Assignee: wine-bugs@winehq.org Reporter: lolisamurai@tfwno.gf Distribution: ---
Created attachment 68139 --> https://bugs.winehq.org/attachment.cgi?id=68139 trace with WINEDEBUG=+cmd
I ran into a scene installer that calls cmd /c with very convoluted quoting. I narrowed the bug down to this example (run from C:):
cmd /c "cd "windows"&&"system32\notepad.exe""
when you run this on windows 10 cmd, it cd's to windows and opens notepad as expected
on wine, it interprets "windows"&&"system32\notepad.exe" as the directory to cd to. I have attached a trace with WINEDEBUG=+cmd
https://bugs.winehq.org/show_bug.cgi?id=49811
--- Comment #1 from Franc[e]sco lolisamurai@tfwno.gf --- more info on the parsing quirks for this nested quotes syntax: https://jpsoft.com/forums/threads/cmds-nested-quote-syntax.2720/#post-14407
https://bugs.winehq.org/show_bug.cgi?id=49811
--- Comment #2 from Franc[e]sco lolisamurai@tfwno.gf --- Created attachment 68141 --> https://bugs.winehq.org/attachment.cgi?id=68141 patch that fixes the issue
this patch fixes the issue by stopping quote counting at & in WCMD_IsEndQuote however I'm not 100% sure this won't break other stuff as I'm not familiar with wine's cmd parsing code
https://bugs.winehq.org/show_bug.cgi?id=49811
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
https://bugs.winehq.org/show_bug.cgi?id=49811
qsniyg qsniyg@mail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |qsniyg@mail.com
--- Comment #3 from qsniyg qsniyg@mail.com --- Should be fixed with fc1bb9aff5c5af22819879e98ffab25bc833fb03
https://bugs.winehq.org/show_bug.cgi?id=49811
Franc[e]sco lolisamurai@tfwno.gf changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
--- Comment #4 from Franc[e]sco lolisamurai@tfwno.gf --- yep, fixed!
https://bugs.winehq.org/show_bug.cgi?id=49811
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |fc1bb9aff5c5af22819879e98ff | |ab25bc833fb03
https://bugs.winehq.org/show_bug.cgi?id=49811
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 5.18.
https://bugs.winehq.org/show_bug.cgi?id=49811
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |5.0.x
https://bugs.winehq.org/show_bug.cgi?id=49811
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|5.0.x |---
--- Comment #6 from Michael Stefaniuc mstefani@winehq.org --- Removing the 5.0.x milestone from bug fixes included in 5.0.4.