]> wimlib.net Git - wimlib/blobdiff - src/split.c
Win32: Use O_BINARY to stop Windows from messing with our data
[wimlib] / src / split.c
index 47168c8f379b549258b43eb890d05e61ae7a4e79..8b67079e0f507316eba1b91f40ab0aefac143a1a 100644 (file)
@@ -225,7 +225,7 @@ wimlib_split(WIMStruct *w, const tchar *swm_name,
                        part_name = swm_base_name;
                }
 
-               part_fd = topen(part_name, O_WRONLY);
+               part_fd = topen(part_name, O_WRONLY | O_BINARY);
                if (part_fd == INVALID_FILEDES) {
                        ERROR_WITH_ERRNO("Failed to open `%"TS"'", part_name);
                        ret = WIMLIB_ERR_OPEN;