msi: Extract cabinets based on DiskId, not LastSequence

James Hawkins truiken at gmail.com
Fri Oct 27 02:42:14 CDT 2006


Hi,

The remaining todo_wine's in this test case happen because we don't
support rollbacks yet in MSI, but the behavior is now correct.

Changelog:
* Extract cabinets based on DiskId, not LastSequence.

 dlls/msi/files.c         |    7 ++++++-
 dlls/msi/tests/install.c |   16 ++++++++--------
 2 files changed, 14 insertions(+), 9 deletions(-)

-- 
James Hawkins
-------------- next part --------------
diff --git a/dlls/msi/files.c b/dlls/msi/files.c
index 25b8847..469c2c8 100644
--- a/dlls/msi/files.c
+++ b/dlls/msi/files.c
@@ -458,7 +458,7 @@ static UINT ready_media_for_file( MSIPAC
          '`','M','e','d','i','a','`',' ','W','H','E','R','E',' ',
          '`','L','a','s','t','S','e','q','u','e','n','c','e','`',' ','>','=',
          ' ','%', 'i',' ','O','R','D','E','R',' ','B','Y',' ',
-         '`','L','a','s','t','S','e','q','u','e','n','c','e','`',0};
+         '`','D','i','s','k','I','d','`',0};
     LPCWSTR cab, volume;
     DWORD sz;
     INT seq;
@@ -695,8 +695,13 @@ UINT ACTION_InstallFiles(MSIPACKAGE *pac
         if (file->IsCompressed)
         {
             if (INVALID_FILE_ATTRIBUTES == GetFileAttributesW(file->TargetPath))
+            {
                 ERR("compressed file wasn't extracted (%s)\n",
                     debugstr_w(file->TargetPath));
+                rc = ERROR_INSTALL_FAILURE;
+                break;
+            }
+
             continue;
         }
 
diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c
index 70edf11..01d0615 100644
--- a/dlls/msi/tests/install.c
+++ b/dlls/msi/tests/install.c
@@ -839,13 +839,13 @@ static void test_caborder(void)
     create_cab_file("test2.cab", MEDIA_SIZE, "augustus\0");
 
     r = MsiInstallProductA(msifile, NULL);
+    ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r);
+    ok(!delete_pf("msitest\\augustus", TRUE), "File is installed\n");
     todo_wine
     {
-        ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r);
-        ok(!delete_pf("msitest\\augustus", TRUE), "File is installed\n");
-        ok(!delete_pf("msitest", FALSE), "File is installed\n");
+    	ok(!delete_pf("msitest\\maximus", TRUE), "File is installed\n");
+    	ok(!delete_pf("msitest", FALSE), "File is installed\n");
     }
-    ok(!delete_pf("msitest\\maximus", TRUE), "File is installed\n");
 
     DeleteFile("test1.cab");
     DeleteFile("test2.cab");
@@ -854,12 +854,12 @@ static void test_caborder(void)
     create_cab_file("test2.cab", MEDIA_SIZE, "maximus\0augustus\0");
 
     r = MsiInstallProductA(msifile, NULL);
+    ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r);
+    ok(!delete_pf("msitest\\maximus", TRUE), "File is installed\n");
+    ok(!delete_pf("msitest\\augustus", TRUE), "File is installed\n");
     todo_wine
     {
-        ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r);
-        ok(!delete_pf("msitest\\maximus", TRUE), "File is installed\n");
-        ok(!delete_pf("msitest\\augustus", TRUE), "File is installed\n");
-        ok(!delete_pf("msitest", FALSE), "File is installed\n");
+    	ok(!delete_pf("msitest", FALSE), "File is installed\n");
     }
 
     DeleteFile("test1.cab");
-- 
1.4.2.4


More information about the wine-patches mailing list