From f1aba65bbb8af8c808bed8a083754d17d3aa3d26 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Mon, 6 Mar 2017 02:33:33 -0800 Subject: [PATCH] UI: Fix game capture check when about to update To check to see if a file is locked, it must be opened for writing, not reading. --- UI/win-update/win-update.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UI/win-update/win-update.cpp b/UI/win-update/win-update.cpp index ee4f96d8a..6cfec737f 100644 --- a/UI/win-update/win-update.cpp +++ b/UI/win-update/win-update.cpp @@ -510,7 +510,7 @@ int AutoUpdateThread::queryUpdate(bool manualUpdate, const char *text_utf8) static bool IsFileInUse(const wstring &file) { - WinHandle f = CreateFile(file.c_str(), GENERIC_READ, 0, nullptr, + WinHandle f = CreateFile(file.c_str(), GENERIC_WRITE, 0, nullptr, OPEN_EXISTING, 0, nullptr); if (!f.Valid()) { int err = GetLastError();