From 7edea0cc6868505252c65cbf0846b2f577660e51 Mon Sep 17 00:00:00 2001 From: James Hawkins Date: Tue, 1 Aug 2006 10:14:15 -0700 Subject: [PATCH] msi: Set the install state to INSTALLSTATE_LOCAL for features with compressed files. --- dlls/msi/action.c | 7 +++++++ dlls/msi/action.h | 1 + dlls/msi/tests/package.c | 5 +---- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 65cfa7719fe..cce2a59d0e2 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -1328,6 +1328,7 @@ static UINT load_file(MSIRECORD *row, LPVOID param) if (file->Attributes & msidbFileAttributesCompressed) { + file->Component->ForceLocalState = TRUE; file->Component->Action = INSTALLSTATE_LOCAL; file->Component->ActionRequest = INSTALLSTATE_LOCAL; } @@ -1755,6 +1756,12 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package) } } } + + if (component->ForceLocalState) + { + feature->Action = INSTALLSTATE_LOCAL; + feature->ActionRequest = INSTALLSTATE_LOCAL; + } } } diff --git a/dlls/msi/action.h b/dlls/msi/action.h index 8edfbb03498..93d28c6a5ec 100644 --- a/dlls/msi/action.h +++ b/dlls/msi/action.h @@ -59,6 +59,7 @@ typedef struct tagMSICOMPONENT INSTALLSTATE ActionRequest; INSTALLSTATE Action; + BOOL ForceLocalState; BOOL Enabled; INT Cost; INT RefCount; diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c index 62920fa4e1e..3f0299e2f06 100644 --- a/dlls/msi/tests/package.c +++ b/dlls/msi/tests/package.c @@ -1683,10 +1683,7 @@ static void test_states(void) r = MsiGetFeatureState(hpkg, "three", &state, &action); ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - todo_wine - { - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - } + ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); state = 0xdeadbee; action = 0xdeadbee;