From 5750a660c22d13c2d24011055776db078cc08d29 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Fri, 21 Mar 2014 07:23:44 -0700 Subject: [PATCH] Open files with FILE_SHARE_READ on Windows --- libaegisub/common/file_mapping.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libaegisub/common/file_mapping.cpp b/libaegisub/common/file_mapping.cpp index 428706fa6..aeec3a081 100644 --- a/libaegisub/common/file_mapping.cpp +++ b/libaegisub/common/file_mapping.cpp @@ -34,7 +34,7 @@ using namespace boost::interprocess; namespace agi { file_mapping::file_mapping(agi::fs::path const& filename, boost::interprocess::mode_t mode) #ifdef _WIN32 -: handle(CreateFileW(filename.wstring().c_str(), (unsigned int)mode, 0, nullptr, OPEN_EXISTING, 0, 0)) +: handle(CreateFileW(filename.wstring().c_str(), (unsigned int)mode, FILE_SHARE_READ, nullptr, OPEN_EXISTING, 0, 0)) { if (handle == ipcdetail::invalid_file()) { switch (GetLastError()) {