1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-17 00:44:19 +00:00

Windows: Ensure that memory mapped files behave the same on all targets by allowing other code to open the memory mapped file with write priveleges even if the map was created with read priveleges only

This commit is contained in:
hogliux 2017-08-29 09:44:45 +01:00
parent d5249492ae
commit b83bf4e7ce

View file

@ -360,7 +360,7 @@ void MemoryMappedFile::openInternal (const File& file, AccessMode mode, bool exc
}
HANDLE h = CreateFile (file.getFullPathName().toWideCharPointer(), accessMode,
exclusive ? 0 : (FILE_SHARE_READ | (mode == readWrite ? FILE_SHARE_WRITE : 0)), 0,
exclusive ? 0 : FILE_SHARE_WRITE, 0,
createType, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, 0);
if (h != INVALID_HANDLE_VALUE)