Hans Leidekker : msi: Update the cached product code when the property has changed.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Sep 2 14:30:38 CDT 2014


Module: wine
Branch: master
Commit: 614cb7eac75a3eabc261821725f7f145fdf603a7
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=614cb7eac75a3eabc261821725f7f145fdf603a7

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Mon Sep  1 16:04:53 2014 +0200

msi: Update the cached product code when the property has changed.

---

 dlls/msi/action.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 7ebdcc8..1fe6226 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -7754,7 +7754,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
     static const WCHAR szDisableRollback[] = {'D','I','S','A','B','L','E','R','O','L','L','B','A','C','K',0};
     static const WCHAR szAction[] = {'A','C','T','I','O','N',0};
     static const WCHAR szInstall[] = {'I','N','S','T','A','L','L',0};
-    WCHAR *reinstall, *remove, *patch;
+    WCHAR *reinstall, *remove, *patch, *productcode;
     BOOL ui_exists;
     UINT rc;
 
@@ -7823,6 +7823,15 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
     msi_adjust_privilege_properties( package );
     msi_set_context( package );
 
+    productcode = msi_dup_property( package->db, szProductCode );
+    if (strcmpiW( productcode, package->ProductCode ))
+    {
+        TRACE( "product code changed %s -> %s\n", debugstr_w(package->ProductCode), debugstr_w(productcode) );
+        msi_free( package->ProductCode );
+        package->ProductCode = productcode;
+    }
+    else msi_free( productcode );
+
     if (msi_get_property_int( package->db, szDisableRollback, 0 ))
     {
         TRACE("disabling rollback\n");




More information about the wine-cvs mailing list