Commit d17ebc40 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: Advance to the right cabinet in ACTION_MsiPublishAssemblies.

parent 8bfc0877
......@@ -6919,33 +6919,33 @@ static UINT ACTION_MsiPublishAssemblies( MSIPACKAGE *package )
if (assembly->installed && !mi->is_continuous)
continue;
if (assembly->file->Sequence > mi->last_sequence || mi->is_continuous ||
(assembly->file->IsCompressed && !mi->is_extracted))
if (assembly->file->IsCompressed)
{
MSICABDATA data;
r = ready_media(package, assembly->file, mi);
if (r != ERROR_SUCCESS)
if (assembly->file->disk_id != mi->disk_id || mi->is_continuous)
{
ERR("Failed to ready media\n");
break;
}
MSICABDATA data;
data.mi = mi;
data.package = package;
data.cb = installassembly_cb;
data.user = &assemblies;
r = ready_media(package, assembly->file, mi);
if (r != ERROR_SUCCESS)
{
ERR("Failed to ready media\n");
break;
}
if (assembly->file->IsCompressed &&
!msi_cabextract(package, mi, &data))
{
ERR("Failed to extract cabinet: %s\n", debugstr_w(mi->cabinet));
r = ERROR_FUNCTION_FAILED;
break;
data.mi = mi;
data.package = package;
data.cb = installassembly_cb;
data.user = &assemblies;
if (!msi_cabextract(package, mi, &data))
{
ERR("Failed to extract cabinet: %s\n", debugstr_w(mi->cabinet));
r = ERROR_FUNCTION_FAILED;
break;
}
}
}
if (!assembly->file->IsCompressed)
else
{
LPWSTR source = resolve_file_source(package, assembly->file);
......
......@@ -629,12 +629,10 @@ static UINT msi_load_media_info(MSIPACKAGE *package, MSIFILE *file, MSIMEDIAINFO
static const WCHAR query[] = {
'S','E','L','E','C','T',' ','*',' ', 'F','R','O','M',' ',
'`','M','e','d','i','a','`',' ','W','H','E','R','E',' ',
'`','L','a','s','t','S','e','q','u','e','n','c','e','`',' ','>','=',
' ','%','i',' ','A','N','D',' ','`','D','i','s','k','I','d','`',' ','>','=',
' ','%','i',' ','O','R','D','E','R',' ','B','Y',' ',
'`','D','i','s','k','I','d','`',0};
'`','L','a','s','t','S','e','q','u','e','n','c','e','`',' ','>','=',' ','%','i',
' ','O','R','D','E','R',' ','B','Y',' ','`','D','i','s','k','I','d','`',0};
row = MSI_QueryGetRecord(package->db, query, file->Sequence, mi->disk_id);
row = MSI_QueryGetRecord(package->db, query, file->Sequence);
if (!row)
{
TRACE("Unable to query row\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment