[PATCH 2/9] CMD : Correct support for cmd.exe /C string [try 2]
Jason Edmeades
jason.edmeades at googlemail.com
Tue Sep 7 17:59:42 CDT 2010
Difference to try 1 - add broken for NT4 which doesnt support %ERRORLEVEL%
The cmd.exe help is very explicit in when the new behaviour relating to
the removing of quotes when cmd.exe /C is used, and if any of them fail
then the behaviour reverts back to the old method, which is equivalent
to /S. This patch corrects that behaviour in that it enforces at least
one space, plus that the thing in quotes is an executable.
Fixes bugs 21927,18057,11073
Note1: Tested manually on windows with procmon, windows does indeed do
the same as this patch, ie a double path/pathext search.
Note2: Tests in the patch are not good. This is because the only extra
tests you can execute rely on the ability to have an executable which
returns a specific string AND is identifiable as an executable. All
exe's under wine are dummy ones created in the build - you cant copy
e.g. cmd.exe to fred.exe and then launch it.
---
programs/cmd/batch.c | 2 +-
programs/cmd/tests/test_builtins.cmd | 4 ++
programs/cmd/tests/test_builtins.cmd.exp | 2 +
programs/cmd/wcmd.h | 2 +-
programs/cmd/wcmdmain.c | 59 +++++++++++++++++++-----------
5 files changed, 45 insertions(+), 24 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-CMD-Correct-support-for-cmd.exe-C-string-try-2.txt
Type: text/x-patch
Size: 7520 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20100907/1f674fc4/attachment-0001.bin>
More information about the wine-patches
mailing list