From b91fc465ff493f31238696c7e829b688c8cdf92c Mon Sep 17 00:00:00 2001 From: Nicolas Le Cam Date: Tue, 21 Apr 2009 02:11:23 +0200 Subject: [PATCH] msi: Fix ACTION_AppSearchDr on empty path. --- dlls/msi/appsearch.c | 7 +++++-- dlls/msi/tests/package.c | 1 - 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dlls/msi/appsearch.c b/dlls/msi/appsearch.c index ff54be0b6d2..9cc1592a586 100644 --- a/dlls/msi/appsearch.c +++ b/dlls/msi/appsearch.c @@ -969,7 +969,10 @@ static UINT ACTION_AppSearchDr(MSIPACKAGE *package, LPWSTR *appValue, MSISIGNATU else depth = MSI_RecordGetInteger(row,4); - ACTION_ExpandAnyPath(package, path, expanded, MAX_PATH); + if (sz) + ACTION_ExpandAnyPath(package, path, expanded, MAX_PATH); + else + strcpyW(expanded, path); if (parent) { @@ -984,7 +987,7 @@ static UINT ACTION_AppSearchDr(MSIPACKAGE *package, LPWSTR *appValue, MSISIGNATU strcpyW(path, parent); strcatW(path, expanded); } - else + else if (sz) strcpyW(path, expanded); PathAddBackslashW(path); diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c index 876626037e2..12127ee0ae3 100644 --- a/dlls/msi/tests/package.c +++ b/dlls/msi/tests/package.c @@ -8818,7 +8818,6 @@ static void test_appsearch_drlocator(void) search_absolute_directory(path, ""); r = MsiGetPropertyA(hpkg, "SIGPROP11", 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); DeleteFileA("FileName1");