Commit 0ed51690 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

msi: Only check the file signature if the candidate file is not a directory.

parent 1fb22654
......@@ -760,18 +760,17 @@ static UINT ACTION_RecurseSearchDirectory(MSIPACKAGE *package, LPWSTR *appValue,
hFind = FindFirstFileW(buf, &findData);
if (hFind != INVALID_HANDLE_VALUE)
{
BOOL matches;
/* assuming Signature can't contain wildcards for the file name,
* so don't bother with FindNextFileW here.
*/
rc = ACTION_FileMatchesSig(sig, &findData, buf, &matches);
if (rc == ERROR_SUCCESS && matches)
if (!(findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
{
TRACE("found file, returning %s\n", debugstr_w(buf));
*appValue = buf;
}
BOOL matches;
rc = ACTION_FileMatchesSig(sig, &findData, buf, &matches);
if (rc == ERROR_SUCCESS && matches)
{
TRACE("found file, returning %s\n", debugstr_w(buf));
*appValue = buf;
}
}
FindClose(hFind);
}
......
......@@ -7163,10 +7163,7 @@ static void test_appsearch_drlocator(void)
size = MAX_PATH;
r = MsiGetPropertyA(hpkg, "SIGPROP6", prop, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
todo_wine
{
ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop);
}
ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop);
size = MAX_PATH;
sprintf(path, "%s\\one\\two\\three\\FileName2", CURR_DIR);
......
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