Module: wine Branch: refs/heads/master Commit: 8bce656fd38d0613341eb43d9ed5627b2abe5d1e URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=8bce656fd38d0613341eb43d...
Author: Mike McCormack mike@codeweavers.com Date: Fri Jul 21 14:04:44 2006 +0900
msi: Components with INSTALLSTATE_NOTUSED are considered present.
---
dlls/msi/msi.c | 24 +++++++++++++++--------- 1 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index f197f47..f138d1c 100644 --- a/dlls/msi/msi.c +++ b/dlls/msi/msi.c @@ -1124,6 +1124,7 @@ INSTALLSTATE WINAPI MsiQueryFeatureState UINT rc; HKEY hkey; INSTALLSTATE r; + BOOL missing = FALSE;
TRACE("%s %s\n", debugstr_w(szProduct), debugstr_w(szFeature));
@@ -1166,8 +1167,7 @@ INSTALLSTATE WINAPI MsiQueryFeatureState return INSTALLSTATE_UNKNOWN; }
- r = INSTALLSTATE_LOCAL; - for( p = components; (*p != 2) && (lstrlenW(p) > 20); p += 20) + for( p = components; *p != 2 ; p += 20) { if (!decode_base85_guid( p, &guid )) { @@ -1176,19 +1176,25 @@ INSTALLSTATE WINAPI MsiQueryFeatureState } StringFromGUID2(&guid, comp, GUID_SIZE); r = MsiGetComponentPathW(szProduct, comp, NULL, 0); - if (r != INSTALLSTATE_LOCAL && r != INSTALLSTATE_SOURCE) + TRACE("component %s state %d\n", debugstr_guid(&guid), r); + switch (r) { - TRACE("component %s state %d\n", debugstr_guid(&guid), r); - r = INSTALLSTATE_ADVERTISED; + case INSTALLSTATE_NOTUSED: + case INSTALLSTATE_LOCAL: + case INSTALLSTATE_SOURCE: + break; + default: + missing = TRUE; } }
- if (r == INSTALLSTATE_LOCAL && *p != 2) - ERR("%s -> %s\n", debugstr_w(szFeature), debugstr_w(components)); - + TRACE("%s %s -> %d\n", debugstr_w(szProduct), debugstr_w(szFeature), r); msi_free(components);
- return r; + if (missing) + return INSTALLSTATE_ADVERTISED; + + return INSTALLSTATE_LOCAL; }
/******************************************************************