James Hawkins : msi: Append the file signature to the component' s directory when searching for the component's key path.

Alexandre Julliard julliard at winehq.org
Mon Oct 13 06:39:22 CDT 2008


Module: wine
Branch: master
Commit: 65915af1ae6fd800c70a34fefe7199555bbff3a8
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=65915af1ae6fd800c70a34fefe7199555bbff3a8

Author: James Hawkins <jhawkins at codeweavers.com>
Date:   Mon Oct 13 03:57:36 2008 -0500

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 0743aee..e013b58 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 e52c931..b2a3cf4 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);




More information about the wine-cvs mailing list