cmd: Fix cmd's mishandling of quote-enclosed command strings

Jacek Caban jacek at
Fri Jul 16 06:33:30 CDT 2010

  On 7/16/10 1:16 PM, Wilbert Ho wrote:
> cmd mishandles quote-enclosed command strings because the leading
> quote is included in the string when wine searches through the
> built-in commands (dir is a builtin, but "dir is not).
> $ ./wine cmd.exe /c "dir README"
> wine: cannot find L"C:\\windows\\system32\\dir.exe"
> File not found
> To fix this, offset the string being compared to the array of builtins
> by the number of leading quotes before doing the comparison.

+dir /b Makefile test_builtins.cmd
+dir /b Makefile
+dir /b test_builtins.cmd
+dir /b "Makefile"
+dir /b "test_builtins.cmd"
+"dir /b Makefile"
+"dir /b test_builtins.cmd"

You can't assume that these files are present when running the test. If you need additional files for test, you have to create them in runtime. In this particular case it looks like you could choose other builtin command for test that doesn't require any additional file.


More information about the wine-devel mailing list