mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 23:27:35 +00:00
cmd: for /f fails to launch quoted program plus args.
for /f can run a program and parse its output. The program name can supply args and be quoted or not. If quoted, wine fails to run the program because internally we were adding an extra pair of quotes. These are not needed and can be removed. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=39906 Signed-off-by: Jason Edmeades <us@edmeades.me.uk> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
58d21b3319
commit
8b6ba774c0
|
@ -2073,7 +2073,7 @@ static HANDLE WCMD_forf_getinputhandle(BOOL usebackq, WCHAR *itemstr, BOOL iscmd
|
|||
static const WCHAR redirOutW[] = {'>','%','s','\0'};
|
||||
static const WCHAR cmdW[] = {'C','M','D','\0'};
|
||||
static const WCHAR cmdslashcW[] = {'C','M','D','.','E','X','E',' ',
|
||||
'/','C',' ','"','%','s','"','\0'};
|
||||
'/','C',' ','%','s','\0'};
|
||||
|
||||
/* Remove leading and trailing character */
|
||||
if ((iscmd && (itemstr[0] == '`' && usebackq)) ||
|
||||
|
|
|
@ -1724,9 +1724,11 @@ if "%CD%"=="" goto :SkipFORFcmdNT4
|
|||
for /f %%i in ('echo.Passed1') do echo %%i
|
||||
for /f "usebackq" %%i in (`echo.Passed2`) do echo %%i
|
||||
for /f usebackq %%i in (`echo.Passed3`) do echo %%i
|
||||
for /f "usebackq" %%i in (`"c:\windows\system32\cmd.exe" /C echo Passed4`) do echo %%i
|
||||
for /f "usebackq" %%i in (`""c:\windows\system32\cmd.exe" /C echo Passed5"`) do echo %%i
|
||||
goto :ContinueFORF
|
||||
:SkipFORFcmdNT4
|
||||
for /l %%i in (1,1,3) do echo Missing functionality - Broken%%i
|
||||
for /l %%i in (1,1,5) do echo Missing functionality - Broken%%i
|
||||
:ContinueFORF
|
||||
rem FIXME: Rest not testable right now in wine: not implemented and would need
|
||||
rem preliminary grep-like program implementation (e.g. like findstr or fc) even
|
||||
|
|
|
@ -1209,6 +1209,8 @@ c
|
|||
Passed1@or_broken@Missing functionality - Broken1
|
||||
Passed2@or_broken@Missing functionality - Broken2
|
||||
Passed3@or_broken@Missing functionality - Broken3
|
||||
Passed4@or_broken@Missing functionality - Broken4
|
||||
Passed5@or_broken@Missing functionality - Broken5
|
||||
------ eol option
|
||||
and@or_broken@Broken NT4 functionality1
|
||||
Line@or_broken@Broken NT4 functionality2
|
||||
|
|
Loading…
Reference in a new issue