[Bug 44441] New: for loop reading a file strips out double quotes and then equals
https://bugs.winehq.org/show_bug.cgi?id=44441 Bug ID: 44441 Summary: for loop reading a file strips out double quotes and then equals Product: Wine Version: 1.8.5 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: cmd Assignee: wine-bugs(a)winehq.org Reporter: india.mcq(a)gmail.com Distribution: --- Created attachment 60386 --> https://bugs.winehq.org/attachment.cgi?id=60386 test batch file, test.txt, results for Windows and Wine My batch file has this for loop that reads a line at a time. FOR /F "eol=# tokens=2 delims=;" %%i in (%tasklist%) do call :%%i It feeds everything after the semicolon to a called function that is at the start of the line. The full line is like this: comment area ;xslt xsltname "param1=info1 param2=info2" blank.xml dostuff.xslt Windows passes exactly that to the called function xslt. But Wine cmd does two unexpected things. First it strips out the double quotes. But when the params are received by the receiving function in this case :xslt then the equals are also stripped out. Thus the received params are: %~0 = :xslt %~1 = xsltname %~2 = param1 %~3 = info1 %~4 = param2 %~5 = info2 %~6 = blank.xml %~7 = dostuff.xslt While Windows would have the params as: %~0 = :xslt %~1 = xsltname %~2 = param1=info1 param2=info2 %~3 = blank.xml %~4 = dostuff.xslt As it is reading a text file there is nothing I can do to pre manipulate the text file. I can see that striping out the equals is a good thing at times but I don't want that here. Is this fixable by configuration? Or is it a bug? Ian -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=44441 Fabian Maurer <dark.shadow4(a)web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4(a)web.de Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Keywords| |download --- Comment #1 from Fabian Maurer <dark.shadow4(a)web.de> --- No, that's a bug, and it's still relevant with wine-3.0. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=44441 --- Comment #2 from Ian <india.mcq(a)gmail.com> --- (In reply to Fabian Maurer from comment #1)
No, that's a bug, and it's still relevant with wine-3.0.
Thanks for that affirmation. So is it likely to get worked on? My batch file is 2500 lines of code so not trivial to convert to a bash script or something else. I have worked around two other batch issues but this one is a show stopper. Ian -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=44441 --- Comment #3 from Fabian Maurer <dark.shadow4(a)web.de> --- With other batch issues, do you mean in wine or windows? I don't know how likely it is to be worked on, but it probably will be a while until it's fixed, speaking from experience. You'd need someone who understand cmd enough and is willing to fix that. Sidenote, "winetricks -q cmd" doesn't help, since that version of cmd doesn't handle the for loop properly (when run under wine, it work natively. Probably yet another bug). -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=44441 --- Comment #4 from Fabian Maurer <dark.shadow4(a)web.de> --- Welp, guess it was easier than expected. I looked at it, and sent a patch that fixes the issue: https://source.winehq.org/patches/data/141145 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=44441 --- Comment #5 from Ian <india.mcq(a)gmail.com> --- So will the fix be incorporated in my older version as well as the latest versions? Any idea how long that might be? If I want it before a release that includes this patch I assume I have to merge the patch in the sources then rebuild the binary. Very new territory. Thanks for the work. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=44441 --- Comment #6 from Fabian Maurer <dark.shadow4(a)web.de> ---
So will the fix be incorporated in my older version as well as the latest versions? Any idea how long that might be?
Dunno, that depends on how good my patch is. But it won't incorporated into any older wine version.
If I want it before a release that includes this patch I assume I have to merge the patch in the sources then rebuild the binary. Very new territory.
Yes indeed, but that's not as hard as it sounds. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=44441 Fabian Maurer <dark.shadow4(a)web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Fixed by SHA1| |e62000c5c0ba17be6d3c6397e04 | |604407cfb7601 Status|NEW |RESOLVED --- Comment #7 from Fabian Maurer <dark.shadow4(a)web.de> --- Fixed by https://source.winehq.org/git/wine.git/?a=commit;h=e62000c5c0ba17be6d3c6397e... You can either wait for wine-3.2 or use the current git tree. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=44441 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #8 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 3.2. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=44441 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |3.0.x -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=44441 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|3.0.x |--- --- Comment #9 from Michael Stefaniuc <mstefani(a)winehq.org> --- Removing the 3.0.x milestone from bugs included in 3.0.1. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org