cmd.exe: Command type with multiple files should print filenames to stderr.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46983
Signed-off-by: Bernhard Übelacker <bernhardu@mailbox.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 4684e1a9c6)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
oldstable
Bernhard belacker 2019-08-20 15:46:37 +02:00 committed by Michael Stefaniuc
parent 583feb4b7c
commit f94d88e8a9
3 changed files with 25 additions and 3 deletions

View File

@ -4561,8 +4561,8 @@ void WCMD_type (WCHAR *args) {
errorlevel = 1;
} else {
if (writeHeaders) {
static const WCHAR fmt[] = {'\n','%','1','\n','\n','\0'};
WCMD_output(fmt, thisArg);
static const WCHAR fmt[] = {'\n','%','1','\n','\n','\n','\0'};
WCMD_output_stderr(fmt, thisArg);
}
while (WCMD_ReadFile(h, buffer, ARRAY_SIZE(buffer) - 1, &count)) {
if (count == 0) break; /* ReadFile reports success on EOF! */

View File

@ -875,7 +875,15 @@ type ."\foobaz"
echo ---2
type ".\foobaz"
echo ---3
del foobaz
echo foo> foobay
echo ---4
type foobaz foobay > foobax 2> foobaw
echo ---5
type foobax
echo ---6
type foobaw
echo ---7
del foobaz foobay foobax foobaw
echo ------------ Testing NUL ------------
md foobar & cd foobar

View File

@ -659,6 +659,20 @@ bar
---2
bar
---3
---4
---5
bar
foo
---6
foobaz
foobay
---7
------------ Testing NUL ------------
bar
bar