schedsvc: Handle directory creation failure in SchRpcRegisterTask.

This commit is contained in:
Dmitry Timoshkov 2014-04-07 14:30:23 +09:00 committed by Alexandre Julliard
parent 5300364dfd
commit 7e871b94d3

View File

@ -189,6 +189,11 @@ HRESULT __cdecl SchRpcRegisterTask(const WCHAR *path, const WCHAR *xml, DWORD fl
if (!p) p = strrchrW(full_name, '\\');
*p = 0;
hr = create_directory(full_name);
if (hr != S_OK && hr != HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS))
{
heap_free(full_name);
return hr;
}
*p = '\\';
}