From 45425b64c421ba9c4c8f312aef69ea60f21df5c1 Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Fri, 29 Nov 2013 18:55:35 +0100 Subject: [PATCH] mmap.cpp: when creating a memory-mapped file on windows, only allow concurrent read access --- src/libcore/mmap.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libcore/mmap.cpp b/src/libcore/mmap.cpp index c2b5cd42..204e7895 100644 --- a/src/libcore/mmap.cpp +++ b/src/libcore/mmap.cpp @@ -44,8 +44,7 @@ MemoryMappedFile::MemoryMappedFile(const fs::path &filename, size_t size) Log(EError, "close(): unable to close file!"); #elif defined(_WIN32) d->file = CreateFile(filename.string().c_str(), GENERIC_WRITE | GENERIC_READ, - FILE_SHARE_WRITE|FILE_SHARE_READ, NULL, CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL, NULL); + FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); if (d->file == INVALID_HANDLE_VALUE) Log(EError, "Could not open \"%s\": %s", d->filename.string().c_str(), lastErrorText().c_str());