msi: Strip the file off the parent path if it's not a directory.
This commit is contained in:
parent
0ed516908b
commit
7eba78dc7e
|
@ -964,6 +964,12 @@ static UINT ACTION_AppSearchDr(MSIPACKAGE *package, LPWSTR *appValue, MSISIGNATU
|
|||
|
||||
if (parent)
|
||||
{
|
||||
if (!(GetFileAttributesW(parent) & FILE_ATTRIBUTE_DIRECTORY))
|
||||
{
|
||||
PathRemoveFileSpecW(parent);
|
||||
PathAddBackslashW(parent);
|
||||
}
|
||||
|
||||
strcpyW(path, parent);
|
||||
strcatW(path, expanded);
|
||||
}
|
||||
|
|
|
@ -7169,10 +7169,7 @@ static void test_appsearch_drlocator(void)
|
|||
sprintf(path, "%s\\one\\two\\three\\FileName2", CURR_DIR);
|
||||
r = MsiGetPropertyA(hpkg, "SIGPROP7", 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\\FileName3.dll", CURR_DIR);
|
||||
|
|
Loading…
Reference in New Issue