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

Revert recent commit - 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-30 11:42:00 +01:00
parent 91e0385d26
commit 858b206553

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_WRITE, 0,
exclusive ? 0 : (FILE_SHARE_READ | (mode == readWrite ? FILE_SHARE_WRITE : 0)), 0,
createType, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, 0);
if (h != INVALID_HANDLE_VALUE)