msi: Advance to the right cabinet in ACTION_MsiPublishAssemblies.

This commit is contained in:
Hans Leidekker 2010-05-31 12:12:01 +02:00 committed by Alexandre Julliard
parent 8bfc08771c
commit d17ebc4032
2 changed files with 24 additions and 26 deletions

View File

@ -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);

View 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");