http://bugs.winehq.org/show_bug.cgi?id=35412
Bug ID: 35412 Summary: wine's cmd fails on if not exist foo\nul Product: Wine Version: 1.7.11 Hardware: x86 URL: http://www.tinycc.org/ OS: Linux Status: NEW Keywords: download, source Severity: minor Priority: P2 Component: cmd Assignee: wine-bugs@winehq.org Reporter: austinenglish@gmail.com Classification: Unclassified
TinyCC's build script does: if not exist libtcc\nul mkdir libtcc
this fails, and libtcc is not made. Removing '\nul' works around the issue.
http://bugs.winehq.org/show_bug.cgi?id=35412
--- Comment #1 from Austin English austinenglish@gmail.com --- Fixed upstream: http://repo.or.cz/w/tinycc.git/commitdiff/48ad93983f292b0eab62b8d8cce2abcb50...
but wine still needs to be fixed as well
http://bugs.winehq.org/show_bug.cgi?id=35412
Jan Vrany jan.vrany@fit.cvut.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jan.vrany@fit.cvut.cz
https://bugs.winehq.org/show_bug.cgi?id=35412
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #2 from joaopa jeremielapuree@yahoo.fr --- Does the bug still occur with wine-5.0-rc2?
https://bugs.winehq.org/show_bug.cgi?id=35412
--- Comment #3 from Austin English austinenglish@gmail.com --- (In reply to joaopa from comment #2)
Does the bug still occur with wine-5.0-rc2?
You can test it yourself. As you've been you before, don't ping others to do what you can yourself.
https://bugs.winehq.org/show_bug.cgi?id=35412
--- Comment #4 from joaopa jeremielapuree@yahoo.fr --- I did not understand what the bug is. When I understand t bu and I can test it, I do it. That's why I ask you to test again.
And one more question: what is the purpose to open a bug report if you are not inclined to look after it?
https://bugs.winehq.org/show_bug.cgi?id=35412
Jeff Zaroyko jeffz@jeffz.name changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #5 from Jeff Zaroyko jeffz@jeffz.name ---
if not exist libtcc\nul mkdir libtcc
To cut to the heart of the issue, old batch interpreter (like Win98) won't return true for a directory that exists unless \nul is appended. Newer versions, like command.com or cmd.exe on Win XP are not affected.
Here's the testcase to clarify the expected behaviour:
``` mkdir test if exist test echo yes it exists if exist test\nul echo yes it exists rmdir test if exist test echo yes it exists if exist test\nul echo yes it exists ```
Expected output from Windows XP: ``` Z:>mkdir test
Z:>if exist test echo yes it exists yes it exists
Z:>if exist test\nul echo yes it exists yes it exists
Z:>rmdir test
Z:>if exist test echo yes it exists
Z:>if exist test\nul echo yes it exists ```
Unexpected output from wine-2.4.3 (repro the original bug): ```
c:>mkdir test
c:>if exist test echo yes it exists yes it exists
c:>if exist test\nul echo yes it exists yes it exists
c:>rmdir test
c:>if exist test echo yes it exists
c:>if exist test\nul echo yes it exists yes it exists ```
Issue shown above: Wine is always returning true when \nul is used.
Win98 for reference: ``` c:>mkdir test
c:>if exist test echo yes it exists
c:>if exist test\nul echo yes it exists yes it exists
c:>rmdir test
c:>if exist test echo yes it exists
c:>if exist test\nul echo yes it exists ```
In wine-5.0-rc2, the issue is fixed. The output matches XP:
``` c:>mkdir test
c:>if exist test echo yes it exists yes it exists
c:>if exist test\nul echo yes it exists yes it exists
c:>rmdir test
c:>if exist test echo yes it exists
c:>if exist test\nul echo yes it exists ```
Marking fixed.
https://bugs.winehq.org/show_bug.cgi?id=35412
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 5.0-rc3.