Dmitry Timoshkov : mstask: Retry opening a .job file only in case of sharing violation.
Alexandre Julliard
julliard at winehq.org
Tue Jun 12 17:36:03 CDT 2018
Module: wine
Branch: master
Commit: 70ca4ecd1427bdef52cf699f27987edae8346c2c
URL: https://source.winehq.org/git/wine.git/?a=commit;h=70ca4ecd1427bdef52cf699f27987edae8346c2c
Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date: Tue Jun 12 21:41:18 2018 +0800
mstask: Retry opening a .job file only in case of sharing violation.
Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mstask/task.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/mstask/task.c b/dlls/mstask/task.c
index 7499826..69f1e5f 100644
--- a/dlls/mstask/task.c
+++ b/dlls/mstask/task.c
@@ -1444,7 +1444,7 @@ static HRESULT WINAPI MSTASK_IPersistFile_Load(IPersistFile *iface, LPCOLESTR fi
file = CreateFileW(file_name, access, sharing, NULL, OPEN_EXISTING, 0, 0);
if (file != INVALID_HANDLE_VALUE) break;
- if (try++ >= 3)
+ if (GetLastError() != ERROR_SHARING_VIOLATION || try++ >= 3)
{
TRACE("Failed to open %s, error %u\n", debugstr_w(file_name), GetLastError());
return HRESULT_FROM_WIN32(GetLastError());
More information about the wine-cvs
mailing list