Commit b91fc465 authored by Nicolas Le Cam's avatar Nicolas Le Cam Committed by Alexandre Julliard

msi: Fix ACTION_AppSearchDr on empty path.

parent 34202629
...@@ -969,7 +969,10 @@ static UINT ACTION_AppSearchDr(MSIPACKAGE *package, LPWSTR *appValue, MSISIGNATU ...@@ -969,7 +969,10 @@ static UINT ACTION_AppSearchDr(MSIPACKAGE *package, LPWSTR *appValue, MSISIGNATU
else else
depth = MSI_RecordGetInteger(row,4); 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) if (parent)
{ {
...@@ -984,7 +987,7 @@ static UINT ACTION_AppSearchDr(MSIPACKAGE *package, LPWSTR *appValue, MSISIGNATU ...@@ -984,7 +987,7 @@ static UINT ACTION_AppSearchDr(MSIPACKAGE *package, LPWSTR *appValue, MSISIGNATU
strcpyW(path, parent); strcpyW(path, parent);
strcatW(path, expanded); strcatW(path, expanded);
} }
else else if (sz)
strcpyW(path, expanded); strcpyW(path, expanded);
PathAddBackslashW(path); PathAddBackslashW(path);
......
...@@ -8818,7 +8818,6 @@ static void test_appsearch_drlocator(void) ...@@ -8818,7 +8818,6 @@ static void test_appsearch_drlocator(void)
search_absolute_directory(path, ""); search_absolute_directory(path, "");
r = MsiGetPropertyA(hpkg, "SIGPROP11", prop, &size); r = MsiGetPropertyA(hpkg, "SIGPROP11", prop, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); 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);
DeleteFileA("FileName1"); DeleteFileA("FileName1");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment