msi: Don't crash on secondary root folders in msi_resolve_target_folder.

This commit is contained in:
Hans Leidekker 2012-01-05 10:20:18 +01:00 committed by Alexandre Julliard
parent c77b414787
commit de11a50b91
1 changed files with 7 additions and 2 deletions

View File

@ -2284,10 +2284,15 @@ void msi_resolve_target_folder( MSIPACKAGE *package, const WCHAR *name, BOOL loa
}
}
else if (!load_prop || !(path = msi_dup_property( package->db, folder->Directory )))
{
if (folder->Parent && strcmpW( folder->Directory, folder->Parent ))
{
parent = msi_get_loaded_folder( package, folder->Parent );
path = msi_build_directory_name( 3, parent->ResolvedTarget, folder->TargetDefault, NULL );
}
else
path = msi_build_directory_name( 2, folder->TargetDefault, NULL );
}
msi_clean_path( path );
if (folder->ResolvedTarget && !strcmpiW( path, folder->ResolvedTarget ))
{