mirror of https://github.com/odrling/Aegisub
Open files with FILE_SHARE_READ on Windows
This commit is contained in:
parent
ad193f70a9
commit
5750a660c2
|
@ -34,7 +34,7 @@ using namespace boost::interprocess;
|
||||||
namespace agi {
|
namespace agi {
|
||||||
file_mapping::file_mapping(agi::fs::path const& filename, boost::interprocess::mode_t mode)
|
file_mapping::file_mapping(agi::fs::path const& filename, boost::interprocess::mode_t mode)
|
||||||
#ifdef _WIN32
|
#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()) {
|
if (handle == ipcdetail::invalid_file()) {
|
||||||
switch (GetLastError()) {
|
switch (GetLastError()) {
|
||||||
|
|
Loading…
Reference in New Issue