[SHELL32] Improve CChangeNotify::ShouldNotify more

Improved non-recursive cases.
CORE-13950
This commit is contained in:
Katayama Hirofumi MZ 2020-04-11 11:55:06 +09:00
parent 2a32094aa0
commit ddc1a46456

View file

@ -576,7 +576,9 @@ BOOL CChangeNotify::ShouldNotify(LPDELITICKET pTicket, LPNOTIFSHARE pShared)
{
PathAddBackslashW(szPath1);
cch1 = lstrlenW(szPath1);
if (cch < cch1)
if (cch < cch1 &&
(pShared->fRecursive ||
wcschr(&szPath1[cch], L'\\') == &szPath1[cch1 - 1]))
{
szPath1[cch] = 0;
if (lstrcmpiW(szPath, szPath1) == 0)
@ -588,7 +590,9 @@ BOOL CChangeNotify::ShouldNotify(LPDELITICKET pTicket, LPNOTIFSHARE pShared)
{
PathAddBackslashW(szPath2);
cch2 = lstrlenW(szPath2);
if (cch < cch2)
if (cch < cch2 &&
(pShared->fRecursive ||
wcschr(&szPath2[cch], L'\\') == &szPath2[cch2 - 1]))
{
szPath2[cch] = 0;
if (lstrcmpiW(szPath, szPath2) == 0)