mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2025-01-09 03:31:41 +00:00
mm_io_c: open MODE_CREATE files for reading and writing on Windows, too
mkvmerge's output file is opened in MODE_CREATE. This mode is supposed to create the file if it doesn't exist, to truncate it otherwise and to open it for writing. The fix for #1498 requires reading from the file, too, and therefore the file must be opened for reading, too. On non-Windows systems MODE_CREATE was already translated into opening for reading and writing.
This commit is contained in:
parent
43cd756488
commit
efe80d1f65
@ -59,7 +59,7 @@ mm_file_io_c::mm_file_io_c(const std::string &path,
|
||||
disposition = OPEN_ALWAYS;
|
||||
break;
|
||||
case MODE_CREATE:
|
||||
access_mode = GENERIC_WRITE;
|
||||
access_mode = GENERIC_WRITE | GENERIC_READ;
|
||||
share_mode = FILE_SHARE_READ;
|
||||
disposition = CREATE_ALWAYS;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user