Windows: Allow write-only files to be read later.

Fixes #11939, at least the hang described in that issue.  Seems to match
with how the PSP handles file locking.
This commit is contained in:
Unknown W. Brackets 2019-08-10 08:34:01 -07:00
parent dc9e794867
commit 761a9d321f

View file

@ -213,7 +213,7 @@ bool DirectoryFileHandle::Open(const std::string &basePath, std::string &fileNam
}
if (access & FILEACCESS_WRITE) {
desired |= GENERIC_WRITE;
sharemode |= FILE_SHARE_WRITE;
sharemode |= FILE_SHARE_WRITE | FILE_SHARE_READ;
}
if (access & FILEACCESS_CREATE) {
if (access & FILEACCESS_EXCL) {