mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-10-20 05:01:51 -04:00
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.
This commit is contained in:
1 parent
805611615e
commit
f1aba65bbb
1 file changed
+1
-1
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user