]> wimlib.net Git - wimlib/commitdiff
wimextract: For --to-stdout, set stdout to binary mode on Windows
authorEric Biggers <ebiggers3@gmail.com>
Sun, 18 May 2014 02:41:21 +0000 (21:41 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Sun, 18 May 2014 02:41:21 +0000 (21:41 -0500)
programs/imagex.c

index 71289fbb075248a0fc1d472daee2ca409efeecb8..a0db340783eb6f8e720db115f9eff98f4d806426 100644 (file)
@@ -2870,6 +2870,7 @@ imagex_extract(int argc, tchar **argv, int cmd)
                        extract_flags |= WIMLIB_EXTRACT_FLAG_TO_STDOUT;
                        imagex_info_file = stderr;
                        imagex_be_quiet = true;
+                       set_fd_to_binary_mode(STDOUT_FILENO);
                        break;
                case IMAGEX_INCLUDE_INVALID_NAMES_OPTION:
                        extract_flags |= WIMLIB_EXTRACT_FLAG_REPLACE_INVALID_FILENAMES;