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

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

parent c77b4147
......@@ -2285,8 +2285,13 @@ void msi_resolve_target_folder( MSIPACKAGE *package, const WCHAR *name, BOOL loa
}
else if (!load_prop || !(path = msi_dup_property( package->db, folder->Directory )))
{
parent = msi_get_loaded_folder( package, folder->Parent );
path = msi_build_directory_name( 3, parent->ResolvedTarget, folder->TargetDefault, NULL );
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 ))
......
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