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

msi: Keep assembly caches loaded until the package is destroyed.

parent 3480ccbb
...@@ -1017,7 +1017,6 @@ UINT msi_load_all_components( MSIPACKAGE *package ) ...@@ -1017,7 +1017,6 @@ UINT msi_load_all_components( MSIPACKAGE *package )
r = MSI_IterateRecords(view, NULL, load_component, package); r = MSI_IterateRecords(view, NULL, load_component, package);
msiobj_release(&view->hdr); msiobj_release(&view->hdr);
msi_destroy_assembly_caches( package );
return r; return r;
} }
......
...@@ -99,9 +99,11 @@ void msi_destroy_assembly_caches( MSIPACKAGE *package ) ...@@ -99,9 +99,11 @@ void msi_destroy_assembly_caches( MSIPACKAGE *package )
{ {
UINT i; UINT i;
IAssemblyCache_Release( package->cache_sxs ); if (package->cache_sxs)
package->cache_sxs = NULL; {
IAssemblyCache_Release( package->cache_sxs );
package->cache_sxs = NULL;
}
for (i = 0; i < CLR_VERSION_MAX; i++) for (i = 0; i < CLR_VERSION_MAX; i++)
{ {
if (package->cache_net[i]) if (package->cache_net[i])
......
...@@ -399,7 +399,6 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package) ...@@ -399,7 +399,6 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
goto done; goto done;
} }
} }
msi_init_assembly_caches( package );
LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry ) LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry )
{ {
comp->Action = msi_get_component_action( package, comp ); comp->Action = msi_get_component_action( package, comp );
...@@ -414,7 +413,6 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package) ...@@ -414,7 +413,6 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
} }
} }
} }
msi_destroy_assembly_caches( package );
done: done:
msi_free_media_info(mi); msi_free_media_info(mi);
...@@ -1309,7 +1307,6 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package ) ...@@ -1309,7 +1307,6 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package )
msiobj_release( &uirow->hdr ); msiobj_release( &uirow->hdr );
} }
msi_init_assembly_caches( package );
LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry ) LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry )
{ {
comp->Action = msi_get_component_action( package, comp ); comp->Action = msi_get_component_action( package, comp );
...@@ -1328,6 +1325,5 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package ) ...@@ -1328,6 +1325,5 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package )
remove_folder( folder ); remove_folder( folder );
} }
} }
msi_destroy_assembly_caches( package );
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
...@@ -344,9 +344,10 @@ static void free_package_structures( MSIPACKAGE *package ) ...@@ -344,9 +344,10 @@ static void free_package_structures( MSIPACKAGE *package )
static void MSI_FreePackage( MSIOBJECTHDR *arg) static void MSI_FreePackage( MSIOBJECTHDR *arg)
{ {
UINT i;
MSIPACKAGE *package = (MSIPACKAGE *)arg; MSIPACKAGE *package = (MSIPACKAGE *)arg;
msi_destroy_assembly_caches( package );
if( package->dialog ) if( package->dialog )
msi_dialog_destroy( package->dialog ); msi_dialog_destroy( package->dialog );
...@@ -354,10 +355,6 @@ static void MSI_FreePackage( MSIOBJECTHDR *arg) ...@@ -354,10 +355,6 @@ static void MSI_FreePackage( MSIOBJECTHDR *arg)
free_package_structures(package); free_package_structures(package);
CloseHandle( package->log_file ); CloseHandle( package->log_file );
for (i = 0; i < CLR_VERSION_MAX; i++)
if (package->cache_net[i]) IAssemblyCache_Release( package->cache_net[i] );
if (package->cache_sxs) IAssemblyCache_Release( package->cache_sxs );
if (package->delete_on_close) DeleteFileW( package->localfile ); if (package->delete_on_close) DeleteFileW( package->localfile );
msi_free( package->localfile ); msi_free( package->localfile );
} }
......
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