https://bugs.winehq.org/show_bug.cgi?id=42514
Bug ID: 42514 Summary: start.exe incorrectly treats multiple quoted arguments as the console title (breaking .e.g URL opening in League of Legends) Product: Wine Version: unspecified Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: programs Assignee: wine-bugs@winehq.org Reporter: hydratech@gmail.com Distribution: ---
Created attachment 57401 --> https://bugs.winehq.org/attachment.cgi?id=57401 Diff containing the necessary fix for correct multiple quote handling.
Follow up to bug 42508:
On Windows the following two command-lines open a URL in the browser: C:>start "" https://winehq.org
C:>start "" "https://winehq.org"
In other words, the second quoted argument in the second command-line does not override the console title to be "http://winehq.org".
Now consider the following two wine commands: $ wine start '""' 'https://winehq.org'
$ wine start '""' '"https://winehq.org"'
The first line opens the website in a browser, as expected. The second line however opens a console window running cmd. (the title is not actually set, but that's another issue.)
In start.exe's parsing loop the if statement for detecting the console title does not stop checking for the title when a title has already been parsed successfully. Causing 'https://winehq.org' to be interpreted as the console title, and executing cmd.exe since no executable remains on the command-line.
I have provided a diff containing the very simple fix necessary to correctly handle this case. As most of start.exe is still hardtabbed I've left the tabs for now.
League of Legends relies on the correct behaviour of this second quoted argument to open URLs in the browser; see bug 42508.
https://bugs.winehq.org/show_bug.cgi?id=42514
michael bishop cleverca22@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |cleverca22@gmail.com
--- Comment #1 from michael bishop cleverca22@gmail.com --- this is also breaking a program that i am developing
the problem is within a .bat file containing a line similar to the following:
START "" "c:\program path\program.exe"
under windows, it works correctly, under wine it fails removing the first "" fixes wine, but now breaks windows, causing a dos prompt to pop up
https://bugs.winehq.org/show_bug.cgi?id=42514
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
https://bugs.winehq.org/show_bug.cgi?id=42514
Bernhard Übelacker bernhardu@mailbox.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bernhardu@mailbox.org
--- Comment #2 from Bernhard Übelacker bernhardu@mailbox.org --- (In reply to Bas Weelinck from comment #0)
Created attachment 57401 [details] Diff containing the necessary fix for correct multiple quote handling.
I have provided a diff containing the very simple fix necessary to correctly handle this case. As most of start.exe is still hardtabbed I've left the tabs for now.
I was told in the past that patches are normally not picked up from bugzilla. Therefore you probably want to have a look at: https://wiki.winehq.org/Submitting_Patches
https://bugs.winehq.org/show_bug.cgi?id=42514
--- Comment #3 from Bas Weelinck hydratech@gmail.com --- Thanks for the info, I'll look into it.
https://bugs.winehq.org/show_bug.cgi?id=42514
Gijs Vermeulen acescopezz@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |acescopezz@gmail.com
--- Comment #4 from Gijs Vermeulen acescopezz@gmail.com --- Should have been fixed with: https://source.winehq.org/git/wine.git/commit/5b4f8a385b46a8a8a8b09b8ca6578a...
https://bugs.winehq.org/show_bug.cgi?id=42514
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |hydratech@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=42514
Bas Weelinck hydratech@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED
--- Comment #5 from Bas Weelinck hydratech@gmail.com --- wine-2.13 indeed includes the patch.
Marking as fixed.
https://bugs.winehq.org/show_bug.cgi?id=42514
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 2.14.