http://bugs.winehq.org/show_bug.cgi?id=21505
Summary: cmd returns %ProgramFiles% with newline character Product: Wine Version: 1.1.36 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: trivial Priority: P2 Component: cmd AssignedTo: wine-bugs@winehq.org ReportedBy: lukasz.wojnilowicz@gmail.com
The problem is that Wine 1.1.36 returns ProgramFiles variable with newline character at the end. This is an regression because in Wine 1.1.35 ProgramFiles variable hadn't been returned with newline character at the end. I used script below to test it.
#!/bin/bash PROGRAMFILES=`wine cmd /c echo "%ProgramFiles%"` echo "PreviousText_ $PROGRAMFILES _NextText" >& output.txt
1) In Wine 1.1.35 output.txt looks like
PreviousText_ C:/Program Files _NextText
2) In Wine 1.1.36 output.txt looks like
PreviousText_ C:/Program Files _NextText
I tested this behaviour also in MS Windows XP SP3 and It's like in Wine 1.1.35
http://bugs.winehq.org/show_bug.cgi?id=21505
NSLW lukasz.wojnilowicz@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression
http://bugs.winehq.org/show_bug.cgi?id=21505
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID
--- Comment #1 from Vitaliy Margolen vitaliy@kievinfo.com 2010-01-27 20:01:42 --- Don't see a problem here: Win xp: echo %ProgramFiles%> test_echo_win.txt
Wine: wine cmd /c echo "%ProgramFiles%" > test_echo_wine.txt
$ cmp test_echo_win.txt test_echo_wine.txt $
And yes both files contain: 00000000 43 3A 5C 50 │ 72 6F 67 72 │ 61 6D 20 46 │ 69 6C 65 73 │ 0D 0A
http://bugs.winehq.org/show_bug.cgi?id=21505
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #2 from Vitaliy Margolen vitaliy@kievinfo.com 2010-01-27 20:01:55 --- Closing - no bug here.
http://bugs.winehq.org/show_bug.cgi?id=21505
NSLW lukasz.wojnilowicz@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |UNCONFIRMED Resolution|INVALID |
--- Comment #3 from NSLW lukasz.wojnilowicz@gmail.com 2010-01-28 01:33:58 --- (In reply to comment #1)
Don't see a problem here:
It's because you tested it in wrong way.
Win xp: echo %ProgramFiles%> test_echo_win.txt
In cmd do : set PROGRAMFILES=%ProgramFiles% echo "PreviousText_ %PROGRAMFILES% _NextText" > test_echo_wine.txt
Wine: wine cmd /c echo "%ProgramFiles%" > test_echo_wine.txt
In terminal do:
PROGRAMFILES=`wine cmd /c echo %ProgramFiles%` echo "PreviousText_ $PROGRAMFILES _NextText" >& test_echo_wine.txt
Now you can compare both files. In MS WinXP case all is in single line in Wine case text is in two lines.
http://bugs.winehq.org/show_bug.cgi?id=21505
Erich Hoover ehoover@mines.edu changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ehoover@mines.edu
--- Comment #4 from Erich Hoover ehoover@mines.edu 2010-01-28 18:25:50 --- You attached this issue to cmd.exe Version 5.1.2600. Is this actually an issue with the Microsoft cmd.exe or with Wine's cmd.exe?
http://bugs.winehq.org/show_bug.cgi?id=21505
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID
--- Comment #5 from Vitaliy Margolen vitaliy@kievinfo.com 2010-01-29 01:39:45 --- This: set PROGRAMFILES=%ProgramFiles%
And this: wine cmd /c echo "%ProgramFiles%" > test_echo_wine.txt
Are totally different things.
Closing. There is no bug here. cmd _always does_ output new line after every command. If you do not want that - do not use it.
http://bugs.winehq.org/show_bug.cgi?id=21505
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Vitaliy Margolen vitaliy@kievinfo.com 2010-01-29 01:40:58 --- Closing invalid - not a bug. It was a fix for another bug.
http://bugs.winehq.org/show_bug.cgi?id=21505
NSLW lukasz.wojnilowicz@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |RESOLVED
--- Comment #7 from NSLW lukasz.wojnilowicz@gmail.com 2010-01-29 01:43:02 --- (In reply to comment #5)
Closing. There is no bug here. cmd _always does_ output new line after every command. If you do not want that - do not use it.
Why didn't cmd output new line in Wine 1.1.35 and does that in Wine 1.1.36?
http://bugs.winehq.org/show_bug.cgi?id=21505
--- Comment #8 from NSLW lukasz.wojnilowicz@gmail.com 2010-01-29 01:43:43 --- (In reply to comment #4)
You attached this issue to cmd.exe Version 5.1.2600. Is this actually an issue with the Microsoft cmd.exe or with Wine's cmd.exe?
It's bug for Wine's cmd
http://bugs.winehq.org/show_bug.cgi?id=21505
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #9 from Vitaliy Margolen vitaliy@kievinfo.com 2010-01-29 01:45:49 --- Like I said it was a fix for another bug (can't find it right now).
http://bugs.winehq.org/show_bug.cgi?id=21505
--- Comment #10 from Austin English austinenglish@gmail.com 2010-01-29 11:04:26 --- (In reply to comment #7)
(In reply to comment #5)
Closing. There is no bug here. cmd _always does_ output new line after every command. If you do not want that - do not use it.
Why didn't cmd output new line in Wine 1.1.35 and does that in Wine 1.1.36?
Probably http://source.winehq.org/git/wine.git/?a=commitdiff;h=cc72c4d346fa0d61ec19f9..., which was needed to match windows behavior.