[PATCH] msi: Use next cabinet from the media table instead of failing when there is a mismatch with continuous cabinet.

Christian Costa titan.costa at gmail.com
Thu Sep 27 02:59:59 CDT 2012


--

This fixes Yager installation.
---
 dlls/msi/media.c |   14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/dlls/msi/media.c b/dlls/msi/media.c
index 612624d..8a39fcd 100644
--- a/dlls/msi/media.c
+++ b/dlls/msi/media.c
@@ -358,8 +358,18 @@ static INT_PTR cabinet_next_cabinet(FDINOTIFICATIONTYPE fdint,
 
     if (strcmpiW( mi->cabinet, cab ))
     {
-        ERR("Continuous cabinet does not match the next cabinet in the Media table\n");
-        goto done;
+        LPSTR next_cab;
+
+        WARN("Continuous cabinet %s does not match the next cabinet %s in the media table\n", debugstr_w(cab), debugstr_w(mi->cabinet));
+
+        /* Use cabinet name from the media table */
+        next_cab = strdupWtoA(mi->cabinet);
+        /* Modify path to cabinet file with full filename (psz3 points to a 256 bytes buffer that can be modified contrary to psz1 and psz2) */
+        strcat(pfdin->psz3, "\\");
+        strcat(pfdin->psz3, next_cab);
+        /* Path psz3 and cabinet psz1 are concatenated by FDI so just reset psz1 */
+        *pfdin->psz1 = 0;
+        msi_free(next_cab);
     }
 
     if (!(cabinet_file = get_cabinet_filename(mi)))




More information about the wine-patches mailing list