James Hawkins : msi: Only check the file signature if the candidate file is not a directory.
Alexandre Julliard
julliard at winehq.org
Mon Oct 20 08:00:57 CDT 2008
Module: wine
Branch: master
Commit: 0ed516908b69aafc988a787a35f18b16c152d45a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0ed516908b69aafc988a787a35f18b16c152d45a
Author: James Hawkins <jhawkins at codeweavers.com>
Date: Mon Oct 20 04:20:30 2008 -0500
msi: Only check the file signature if the candidate file is not a directory.
---
dlls/msi/appsearch.c | 19 +++++++++----------
dlls/msi/tests/package.c | 5 +----
2 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/dlls/msi/appsearch.c b/dlls/msi/appsearch.c
index 79554db..74d072f 100644
--- a/dlls/msi/appsearch.c
+++ b/dlls/msi/appsearch.c
@@ -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);
}
diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c
index 30c9567..9911bd1 100644
--- a/dlls/msi/tests/package.c
+++ b/dlls/msi/tests/package.c
@@ -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);
More information about the wine-cvs
mailing list