mstask: Retry opening a .job file only in case of sharing violation.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
88f273b77c
commit
70ca4ecd14
@ -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);
|
file = CreateFileW(file_name, access, sharing, NULL, OPEN_EXISTING, 0, 0);
|
||||||
if (file != INVALID_HANDLE_VALUE) break;
|
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());
|
TRACE("Failed to open %s, error %u\n", debugstr_w(file_name), GetLastError());
|
||||||
return HRESULT_FROM_WIN32(GetLastError());
|
return HRESULT_FROM_WIN32(GetLastError());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user