From 761a9d321fe77b44dcc9c5eabe6dc8e319b1673b Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 10 Aug 2019 08:34:01 -0700 Subject: [PATCH] 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. --- Core/FileSystems/DirectoryFileSystem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/FileSystems/DirectoryFileSystem.cpp b/Core/FileSystems/DirectoryFileSystem.cpp index 4e97463300..07b8930abc 100644 --- a/Core/FileSystems/DirectoryFileSystem.cpp +++ b/Core/FileSystems/DirectoryFileSystem.cpp @@ -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) {