From 65915af1ae6fd800c70a34fefe7199555bbff3a8 Mon Sep 17 00:00:00 2001 From: James Hawkins Date: Mon, 13 Oct 2008 03:57:36 -0500 Subject: [PATCH] msi: Append the file signature to the component's directory when searching for the component's key path. --- dlls/msi/appsearch.c | 9 +++++++++ dlls/msi/tests/package.c | 5 +---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/dlls/msi/appsearch.c b/dlls/msi/appsearch.c index 0743aee56e5..e013b58f3a1 100644 --- a/dlls/msi/appsearch.c +++ b/dlls/msi/appsearch.c @@ -225,6 +225,15 @@ static UINT ACTION_AppSearchComponents(MSIPACKAGE *package, LPWSTR *appValue, MS *appValue = strdupW(path); } + else if (sigpresent) + { + PathAddBackslashW(path); + lstrcatW(path, MSI_RecordGetString(rec, 2)); + + attr = GetFileAttributesW(path); + if (attr != INVALID_FILE_ATTRIBUTES && attr != FILE_ATTRIBUTE_DIRECTORY) + *appValue = strdupW(path); + } done: if (rec) msiobj_release(&rec->hdr); diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c index e52c931ac69..b2a3cf4d328 100644 --- a/dlls/msi/tests/package.c +++ b/dlls/msi/tests/package.c @@ -5963,10 +5963,7 @@ static void test_appsearch_complocator(void) sprintf(path, "%s\\FileName5", CURR_DIR); r = MsiGetPropertyA(hpkg, "SIGPROP5", prop, &size); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - todo_wine - { - ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - } + ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); size = MAX_PATH; sprintf(path, "%s\\", CURR_DIR);