mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-12-15 19:59:53 +00:00
Merge pull request #14190 from Dentomologist/directiofile_dont_request_delete_access_for_read_only_open
Windows/DirectIOFile: Don't request DELETE access for read-only Open
This commit is contained in:
commit
59d5e25f5f
@ -86,8 +86,11 @@ bool DirectIOFile::Open(const std::string& path, AccessMode access_mode, OpenMod
|
||||
else if (access_mode == AccessMode::Write)
|
||||
desired_access = GENERIC_WRITE;
|
||||
|
||||
// Allow deleting and renaming through our handle.
|
||||
desired_access |= DELETE;
|
||||
if (access_mode != AccessMode::Read)
|
||||
{
|
||||
// Allow deleting and renaming through our handle.
|
||||
desired_access |= DELETE;
|
||||
}
|
||||
|
||||
// All sharing is allowed to more closely match default behavior on other OSes.
|
||||
constexpr DWORD share_mode = FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user