Peter Oberndorfer : shlwapi: Ignore leading spaces in PathMatchSpec.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Apr 12 04:52:02 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: ac0bee4bf21debd8ef31f8a576b2cac1f6ccf22d
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=ac0bee4bf21debd8ef31f8a576b2cac1f6ccf22d
Author: Peter Oberndorfer <kumbayo84 at arcor.de>
Date: Tue Apr 11 19:17:52 2006 +0000
shlwapi: Ignore leading spaces in PathMatchSpec.
---
dlls/shlwapi/path.c | 18 ++++++++----------
dlls/shlwapi/tests/path.c | 2 +-
2 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/dlls/shlwapi/path.c b/dlls/shlwapi/path.c
index 2ce3445..76e3c6a 100644
--- a/dlls/shlwapi/path.c
+++ b/dlls/shlwapi/path.c
@@ -1869,18 +1869,17 @@ BOOL WINAPI PathMatchSpecA(LPCSTR lpszPa
while (*lpszMask)
{
+ while (*lpszMask == ' ')
+ lpszMask++; /* Eat leading spaces */
+
if (PathMatchSingleMaskA(lpszPath, lpszMask))
return TRUE; /* Matches the current mask */
while (*lpszMask && *lpszMask != ';')
- lpszMask = CharNextA(lpszMask);
+ lpszMask = CharNextA(lpszMask); /* masks separated by ';' */
if (*lpszMask == ';')
- {
lpszMask++;
- while (*lpszMask == ' ')
- lpszMask++; /* masks may be separated by "; " */
- }
}
return FALSE;
}
@@ -1901,18 +1900,17 @@ BOOL WINAPI PathMatchSpecW(LPCWSTR lpszP
while (*lpszMask)
{
+ while (*lpszMask == ' ')
+ lpszMask++; /* Eat leading spaces */
+
if (PathMatchSingleMaskW(lpszPath, lpszMask))
return TRUE; /* Matches the current path */
while (*lpszMask && *lpszMask != ';')
- lpszMask++;
+ lpszMask++; /* masks separated by ';' */
if (*lpszMask == ';')
- {
lpszMask++;
- while (*lpszMask == ' ')
- lpszMask++; /* Masks may be separated by "; " */
- }
}
return FALSE;
}
diff --git a/dlls/shlwapi/tests/path.c b/dlls/shlwapi/tests/path.c
index d7c7e00..2a89618 100644
--- a/dlls/shlwapi/tests/path.c
+++ b/dlls/shlwapi/tests/path.c
@@ -849,7 +849,7 @@ static void test_PathMatchSpec(void)
ok (PathMatchSpecA(file, spec1) == FALSE, "PathMatchSpec: Spec1 failed\n");
ok (PathMatchSpecA(file, spec2) == TRUE, "PathMatchSpec: Spec2 failed\n");
ok (PathMatchSpecA(file, spec3) == FALSE, "PathMatchSpec: Spec3 failed\n");
- todo_wine ok (PathMatchSpecA(file, spec4) == TRUE, "PathMatchSpec: Spec4 failed\n");
+ ok (PathMatchSpecA(file, spec4) == TRUE, "PathMatchSpec: Spec4 failed\n");
todo_wine ok (PathMatchSpecA(file, spec5) == TRUE, "PathMatchSpec: Spec5 failed\n");
todo_wine ok (PathMatchSpecA(file, spec6) == TRUE, "PathMatchSpec: Spec6 failed\n");
ok (PathMatchSpecA(file, spec7) == FALSE, "PathMatchSpec: Spec7 failed\n");
More information about the wine-cvs
mailing list