msi: Set the install state to INSTALLSTATE_LOCAL for features with compressed files.

This commit is contained in:
James Hawkins 2006-08-01 10:14:15 -07:00 committed by Alexandre Julliard
parent 0424424e34
commit 7edea0cc68
3 changed files with 9 additions and 4 deletions

View File

@ -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;
}
}
}

View File

@ -59,6 +59,7 @@ typedef struct tagMSICOMPONENT
INSTALLSTATE ActionRequest;
INSTALLSTATE Action;
BOOL ForceLocalState;
BOOL Enabled;
INT Cost;
INT RefCount;

View File

@ -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;