mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-13 07:14:49 +00:00
Win32 FS: Always use FILE_SHARE_DELETE
This commit is contained in:
parent
d0f1b29b39
commit
6b11d82dd0
@ -967,7 +967,7 @@ fs::file::file(const std::string& path, bs_t<open_mode> mode)
|
|||||||
disp = mode & fs::trunc ? TRUNCATE_EXISTING : OPEN_EXISTING;
|
disp = mode & fs::trunc ? TRUNCATE_EXISTING : OPEN_EXISTING;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD share = 0;
|
DWORD share = FILE_SHARE_DELETE;
|
||||||
if (!(mode & fs::unread) || !(mode & fs::write))
|
if (!(mode & fs::unread) || !(mode & fs::write))
|
||||||
{
|
{
|
||||||
share |= FILE_SHARE_READ;
|
share |= FILE_SHARE_READ;
|
||||||
@ -975,7 +975,7 @@ fs::file::file(const std::string& path, bs_t<open_mode> mode)
|
|||||||
|
|
||||||
if (!(mode & (fs::lock + fs::unread)) || !(mode & fs::write))
|
if (!(mode & (fs::lock + fs::unread)) || !(mode & fs::write))
|
||||||
{
|
{
|
||||||
share |= FILE_SHARE_WRITE | FILE_SHARE_DELETE;
|
share |= FILE_SHARE_WRITE;
|
||||||
}
|
}
|
||||||
|
|
||||||
const HANDLE handle = CreateFileW(to_wchar(path).get(), access, share, NULL, disp, FILE_ATTRIBUTE_NORMAL, NULL);
|
const HANDLE handle = CreateFileW(to_wchar(path).get(), access, share, NULL, disp, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user