It was always called with source parameter set to TRUE.
Signed-off-by: Hans Leidekker hans@codeweavers.com --- dlls/msi/action.c | 4 ++-- dlls/msi/appsearch.c | 2 +- dlls/msi/custom.c | 2 +- dlls/msi/dialog.c | 2 +- dlls/msi/msipriv.h | 2 +- dlls/msi/package.c | 16 ++++------------ dlls/msi/upgrade.c | 2 +- 7 files changed, 11 insertions(+), 19 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c index f2a038bc41..8ae9dce57a 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -368,7 +368,7 @@ UINT msi_parse_command_line( MSIPACKAGE *package, LPCWSTR szCommandLine,
r = msi_set_property( package->db, prop, val, -1 ); if (r == ERROR_SUCCESS && !strcmpW( prop, szSourceDir )) - msi_reset_folders( package, TRUE ); + msi_reset_source_folders( package );
msi_free( val ); msi_free( prop ); @@ -486,7 +486,7 @@ UINT msi_set_sourcedir_props(MSIPACKAGE *package, BOOL replace) { UINT r = msi_set_property( package->db, szSourceDir, source, -1 ); if (r == ERROR_SUCCESS) - msi_reset_folders( package, TRUE ); + msi_reset_source_folders( package ); } msi_free( check );
diff --git a/dlls/msi/appsearch.c b/dlls/msi/appsearch.c index fbed073bd4..806365191d 100644 --- a/dlls/msi/appsearch.c +++ b/dlls/msi/appsearch.c @@ -1107,7 +1107,7 @@ static UINT iterate_appsearch(MSIRECORD *row, LPVOID param) { r = msi_set_property( package->db, propName, value, -1 ); if (r == ERROR_SUCCESS && !strcmpW( propName, szSourceDir )) - msi_reset_folders( package, TRUE ); + msi_reset_source_folders( package );
msi_free(value); } diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c index a0fc3dd350..97bde52a29 100644 --- a/dlls/msi/custom.c +++ b/dlls/msi/custom.c @@ -1408,7 +1408,7 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, const WCHAR *action) len = deformat_string( package, target, &deformated ); rc = msi_set_property( package->db, source, deformated, len ); if (rc == ERROR_SUCCESS && !strcmpW( source, szSourceDir )) - msi_reset_folders( package, TRUE ); + msi_reset_source_folders( package ); msi_free(deformated); break; case 37: /* JScript/VBScript text stored in target column. */ diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c index b01374f5e1..6184da84f1 100644 --- a/dlls/msi/dialog.c +++ b/dlls/msi/dialog.c @@ -577,7 +577,7 @@ static void msi_dialog_set_property( MSIPACKAGE *package, LPCWSTR property, LPCW { UINT r = msi_set_property( package->db, property, value, -1 ); if (r == ERROR_SUCCESS && !strcmpW( property, szSourceDir )) - msi_reset_folders( package, TRUE ); + msi_reset_source_folders( package ); }
static MSIFEATURE *msi_seltree_feature_from_item( HWND hwnd, HTREEITEM hItem ) diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index 10031d61de..1710850ebe 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -1025,7 +1025,7 @@ extern void msi_resolve_target_folder(MSIPACKAGE *package, const WCHAR *name, BO extern WCHAR *msi_normalize_path(const WCHAR *) DECLSPEC_HIDDEN; extern WCHAR *msi_resolve_file_source(MSIPACKAGE *package, MSIFILE *file) DECLSPEC_HIDDEN; extern const WCHAR *msi_get_target_folder(MSIPACKAGE *package, const WCHAR *name) DECLSPEC_HIDDEN; -extern void msi_reset_folders( MSIPACKAGE *package, BOOL source ) DECLSPEC_HIDDEN; +extern void msi_reset_source_folders( MSIPACKAGE *package ) DECLSPEC_HIDDEN; extern MSICOMPONENT *msi_get_loaded_component(MSIPACKAGE *package, const WCHAR *Component) DECLSPEC_HIDDEN; extern MSIFEATURE *msi_get_loaded_feature(MSIPACKAGE *package, const WCHAR *Feature) DECLSPEC_HIDDEN; extern MSIFILE *msi_get_loaded_file(MSIPACKAGE *package, const WCHAR *file) DECLSPEC_HIDDEN; diff --git a/dlls/msi/package.c b/dlls/msi/package.c index 39a0a939b7..6ac73a3a3f 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -2154,22 +2154,14 @@ end: return r; }
-void msi_reset_folders( MSIPACKAGE *package, BOOL source ) +void msi_reset_source_folders( MSIPACKAGE *package ) { MSIFOLDER *folder;
LIST_FOR_EACH_ENTRY( folder, &package->folders, MSIFOLDER, entry ) { - if ( source ) - { - msi_free( folder->ResolvedSource ); - folder->ResolvedSource = NULL; - } - else - { - msi_free( folder->ResolvedTarget ); - folder->ResolvedTarget = NULL; - } + msi_free( folder->ResolvedSource ); + folder->ResolvedSource = NULL; } }
@@ -2263,7 +2255,7 @@ UINT WINAPI MsiSetPropertyW( MSIHANDLE hInstall, LPCWSTR szName, LPCWSTR szValue
ret = msi_set_property( package->db, szName, szValue, -1 ); if (ret == ERROR_SUCCESS && !strcmpW( szName, szSourceDir )) - msi_reset_folders( package, TRUE ); + msi_reset_source_folders( package );
msiobj_release( &package->hdr ); return ret; diff --git a/dlls/msi/upgrade.c b/dlls/msi/upgrade.c index bbc7df6eec..36d65be8fe 100644 --- a/dlls/msi/upgrade.c +++ b/dlls/msi/upgrade.c @@ -90,7 +90,7 @@ static void append_productcode(MSIPACKAGE* package, LPCWSTR action_property,
r = msi_set_property( package->db, action_property, newprop, -1 ); if (r == ERROR_SUCCESS && !strcmpW( action_property, szSourceDir )) - msi_reset_folders( package, TRUE ); + msi_reset_source_folders( package );
TRACE("Found Related Product... %s now %s\n", debugstr_w(action_property), debugstr_w(newprop));