msi: Fail if we can't write out a temporary file.
This commit is contained in:
parent
2a46821b82
commit
1767989bd1
|
@ -528,11 +528,13 @@ static UINT HANDLE_CustomType1(MSIPACKAGE *package, LPCWSTR source,
|
|||
LPCWSTR target, const INT type, LPCWSTR action)
|
||||
{
|
||||
WCHAR tmp_file[MAX_PATH];
|
||||
UINT rc = ERROR_SUCCESS;
|
||||
UINT r = ERROR_SUCCESS;
|
||||
BOOL finished = FALSE;
|
||||
HANDLE ThreadHandle;
|
||||
|
||||
store_binary_to_temp(package, source, tmp_file);
|
||||
r = store_binary_to_temp(package, source, tmp_file);
|
||||
if (r != ERROR_SUCCESS)
|
||||
return r;
|
||||
|
||||
TRACE("Calling function %s from %s\n",debugstr_w(target),
|
||||
debugstr_w(tmp_file));
|
||||
|
@ -545,14 +547,14 @@ static UINT HANDLE_CustomType1(MSIPACKAGE *package, LPCWSTR source,
|
|||
|
||||
ThreadHandle = do_msidbCustomActionTypeDll( package, tmp_file, target );
|
||||
|
||||
rc = process_handle(package, type, ThreadHandle, NULL, action, &finished );
|
||||
r = process_handle(package, type, ThreadHandle, NULL, action, &finished );
|
||||
|
||||
if (!finished)
|
||||
track_tempfile(package, tmp_file, tmp_file);
|
||||
else
|
||||
DeleteFileW(tmp_file);
|
||||
|
||||
return rc;
|
||||
return r;
|
||||
}
|
||||
|
||||
static UINT HANDLE_CustomType2(MSIPACKAGE *package, LPCWSTR source,
|
||||
|
@ -566,12 +568,14 @@ static UINT HANDLE_CustomType2(MSIPACKAGE *package, LPCWSTR source,
|
|||
WCHAR *deformated;
|
||||
WCHAR *cmd;
|
||||
static const WCHAR spc[] = {' ',0};
|
||||
UINT prc = ERROR_SUCCESS;
|
||||
UINT r = ERROR_SUCCESS;
|
||||
BOOL finished = FALSE;
|
||||
|
||||
memset(&si,0,sizeof(STARTUPINFOW));
|
||||
|
||||
store_binary_to_temp(package, source, tmp_file);
|
||||
r = store_binary_to_temp(package, source, tmp_file);
|
||||
if (r != ERROR_SUCCESS)
|
||||
return r;
|
||||
|
||||
deformat_string(package,target,&deformated);
|
||||
|
||||
|
@ -605,7 +609,7 @@ static UINT HANDLE_CustomType2(MSIPACKAGE *package, LPCWSTR source,
|
|||
}
|
||||
msi_free(cmd);
|
||||
|
||||
prc = process_handle(package, type, info.hThread, info.hProcess, action,
|
||||
r = process_handle(package, type, info.hThread, info.hProcess, action,
|
||||
&finished);
|
||||
|
||||
if (!finished)
|
||||
|
@ -613,7 +617,7 @@ static UINT HANDLE_CustomType2(MSIPACKAGE *package, LPCWSTR source,
|
|||
else
|
||||
DeleteFileW(tmp_file);
|
||||
|
||||
return prc;
|
||||
return r;
|
||||
}
|
||||
|
||||
static UINT HANDLE_CustomType17(MSIPACKAGE *package, LPCWSTR source,
|
||||
|
|
Loading…
Reference in New Issue