From 6b11d82dd0df0a117a65ef6e70955ec1827caef3 Mon Sep 17 00:00:00 2001 From: Eladash Date: Sat, 12 Sep 2020 07:13:11 +0300 Subject: [PATCH] Win32 FS: Always use FILE_SHARE_DELETE --- Utilities/File.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Utilities/File.cpp b/Utilities/File.cpp index 7f6c8adfa1..da745125b4 100644 --- a/Utilities/File.cpp +++ b/Utilities/File.cpp @@ -967,7 +967,7 @@ fs::file::file(const std::string& path, bs_t mode) disp = mode & fs::trunc ? TRUNCATE_EXISTING : OPEN_EXISTING; } - DWORD share = 0; + DWORD share = FILE_SHARE_DELETE; if (!(mode & fs::unread) || !(mode & fs::write)) { share |= FILE_SHARE_READ; @@ -975,7 +975,7 @@ fs::file::file(const std::string& path, bs_t mode) 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);