eric pouech (@epo) commented about programs/cmd/builtins.c:
- } - while (WCMD_ReadFile(h, buffer, ARRAY_SIZE(buffer) - 1, &count)) { + } + hOut = GetStdHandle(STD_OUTPUT_HANDLE); + if (hOut == INVALID_HANDLE_VALUE) { + WCMD_print_error (); + WCMD_output_stderr(WCMD_LoadMessage(WCMD_READFAIL), thisArg); + CloseHandle(hIn); + return errorlevel = ERROR_INVALID_FUNCTION; + } + + if (writeHeaders) { + WCMD_output_stderr(L"\n%1\n\n\n", thisArg); + } + + if (GetFileType(hIn) == FILE_TYPE_CHAR || GetFileType(hOut) == FILE_TYPE_CHAR) { not sure about that test: you want ascii copy is either input or output is a console (we can leave other devices like COM or PRN out for now) otherwise binary so to me, this boils down to something like: `copy_loop(hin, hout, GetConsoleMode(hin, &dummy) || GetConsoleMode(hout, &dummy))`
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/8920#note_115185