msi: Don't crash on secondary root folders in msi_resolve_target_folder.
Hans Leidekker
hans at codeweavers.com
Thu Jan 5 03:20:18 CST 2012
Fixes http://bugs.winehq.org/show_bug.cgi?id=29440
---
dlls/msi/action.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 8505507..fb62339 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -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 ))
--
1.7.7.3
More information about the wine-patches
mailing list