mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-25 04:11:44 +00:00
Mapped MODE_SAFE to read/write file access.
This commit is contained in:
parent
8375b22bd6
commit
e4d5de5688
@ -49,6 +49,9 @@ mm_io_c::mm_io_c(const char *path, const open_mode mode) {
|
||||
case MODE_CREATE:
|
||||
cmode = "wb+";
|
||||
break;
|
||||
case MODE_SAFE:
|
||||
cmode = "r+b";
|
||||
break;
|
||||
default:
|
||||
throw 0;
|
||||
}
|
||||
@ -120,7 +123,7 @@ mm_io_c::mm_io_c(const char *path, const open_mode mode) {
|
||||
|
||||
switch (mode) {
|
||||
case MODE_READ:
|
||||
access_mode = GENERIC_READ | GENERIC_WRITE;
|
||||
access_mode = GENERIC_READ;
|
||||
share_mode = FILE_SHARE_READ | FILE_SHARE_WRITE;
|
||||
disposition = OPEN_EXISTING;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user