mirror of
https://github.com/corda/corda.git
synced 2025-01-22 12:28:11 +00:00
Request a share mode of both reading and writing for RandomAccessFile open.
This change allows reading and writing to happen concurrently on the file on Windows.
This commit is contained in:
parent
70408ea717
commit
a6753c3dc3
@ -178,7 +178,8 @@ inline Mapping*
|
||||
map(JNIEnv* e, string_t path)
|
||||
{
|
||||
Mapping* result = 0;
|
||||
HANDLE file = CreateFileW(path, FILE_READ_DATA, FILE_SHARE_READ, 0,
|
||||
HANDLE file = CreateFileW(path, FILE_READ_DATA,
|
||||
FILE_SHARE_READ | FILE_SHARE_WRITE, 0,
|
||||
OPEN_EXISTING, 0, 0);
|
||||
if (file != INVALID_HANDLE_VALUE) {
|
||||
unsigned size = GetFileSize(file, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user