http://bugs.winehq.org/show_bug.cgi?id=33639
Bug #: 33639 Summary: wine cmd wrong assignment while using set "var=value" and have spaces after Product: Wine Version: 1.5.30 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: cmd AssignedTo: wine-bugs@winehq.org ReportedBy: loentar@gmail.com Classification: Unclassified
Wine cmd wrongly assign space chars into variable name when using `set "var=value"` form. Spaces after `value"` must not appear in `var`.
This is important thing, because when variable will be inserted into conditional expression it may failed (I keep ^M char to see spaces). For example this lines is failed under wine cmd but works under winxp: ---- set "var=value" ^M if "x%var%"=="xvalue" (echo ok) else (echo fail)^M ----
some test (I keep ^M char to see spaces):
-- start of test.cmd: --
@echo off^M set var=value ^M :: space symbol must appear in `var`^M echo "%var%"^M ^M set "var=value" ^M :: space symbol must NOT appear in `var`^M echo "%var%"^M ^M -- end of test.cmd: --
start under winxp:
----
test.cmd
"value " "value" ----
start under wine cmd:
----
test.cmd
"value " "value " ----
http://bugs.winehq.org/show_bug.cgi?id=33639
Jason Edmeades us@edmeades.me.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |us@edmeades.me.uk AssignedTo|wine-bugs@winehq.org |us@edmeades.me.uk Ever Confirmed|0 |1
--- Comment #1 from Jason Edmeades us@edmeades.me.uk 2013-06-03 16:40:58 CDT --- Some testing shows that set "var=value" ignores all chars after the final quote, and set /p "var=prompt" does the same. Attached patch resolves this issue
http://bugs.winehq.org/show_bug.cgi?id=33639
--- Comment #2 from Jason Edmeades us@edmeades.me.uk 2013-06-03 16:41:24 CDT --- Created attachment 44650 --> http://bugs.winehq.org/attachment.cgi?id=44650 Ignore all chars after final quote in set "var=value" form
http://bugs.winehq.org/show_bug.cgi?id=33639
--- Comment #3 from Jason Edmeades us@edmeades.me.uk 2013-06-04 16:11:28 CDT --- Submitted http://www.winehq.org/pipermail/wine-patches/2013-June/124603.html
http://bugs.winehq.org/show_bug.cgi?id=33639
Jason Edmeades us@edmeades.me.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |56a33a8c558f6b37bf219e289e4 | |8cb514cf697fc Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #4 from Jason Edmeades us@edmeades.me.uk 2013-06-05 15:13:06 CDT --- Committed
http://bugs.winehq.org/show_bug.cgi?id=33639
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Alexandre Julliard julliard@winehq.org 2013-06-07 15:01:09 CDT --- Closing bugs fixed in 1.6-rc1.