Commit ac0bee4b authored by Peter Oberndorfer's avatar Peter Oberndorfer Committed by Alexandre Julliard

shlwapi: Ignore leading spaces in PathMatchSpec.

parent 759324a2
......@@ -1869,18 +1869,17 @@ BOOL WINAPI PathMatchSpecA(LPCSTR lpszPath, LPCSTR lpszMask)
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 lpszPath, LPCWSTR lpszMask)
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;
}
......
......@@ -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");
......
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