msi: Fix ACTION_AppSearchDr on empty path.

This commit is contained in:
Nicolas Le Cam 2009-04-21 02:11:23 +02:00 committed by Alexandre Julliard
parent 34202629c9
commit b91fc465ff
2 changed files with 5 additions and 3 deletions

View File

@ -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);
if (sz)
ACTION_ExpandAnyPath(package, path, expanded, MAX_PATH); 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
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);

View File

@ -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");