Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- 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 7499826937..69f1e5f95c 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());