From e00aedd1a09d512c05ab22771f26362f189ae662 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Fri, 8 Sep 2017 17:14:47 +0300 Subject: [PATCH] fs: minor fix --- Utilities/File.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Utilities/File.cpp b/Utilities/File.cpp index 66b1c2f065..7c8b94907d 100644 --- a/Utilities/File.cpp +++ b/Utilities/File.cpp @@ -675,7 +675,7 @@ bool fs::truncate_file(const std::string& path, u64 length) #ifdef _WIN32 // Open the file - const auto handle = CreateFileW(to_wchar(path).get(), GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + const auto handle = CreateFileW(to_wchar(path).get(), GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (handle == INVALID_HANDLE_VALUE) { g_tls_error = to_error(GetLastError()); @@ -714,7 +714,7 @@ bool fs::utime(const std::string& path, s64 atime, s64 mtime) #ifdef _WIN32 // Open the file - const auto handle = CreateFileW(to_wchar(path).get(), FILE_WRITE_ATTRIBUTES, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + const auto handle = CreateFileW(to_wchar(path).get(), FILE_WRITE_ATTRIBUTES, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (handle == INVALID_HANDLE_VALUE) { g_tls_error = to_error(GetLastError());