From ddc1a46456f6061c321a272aaa71bd4442c5edb6 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Sat, 11 Apr 2020 11:55:06 +0900 Subject: [PATCH] [SHELL32] Improve CChangeNotify::ShouldNotify more Improved non-recursive cases. CORE-13950 --- dll/win32/shell32/shelldesktop/CChangeNotify.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dll/win32/shell32/shelldesktop/CChangeNotify.cpp b/dll/win32/shell32/shelldesktop/CChangeNotify.cpp index 0692ff86989..910e664c8c1 100644 --- a/dll/win32/shell32/shelldesktop/CChangeNotify.cpp +++ b/dll/win32/shell32/shelldesktop/CChangeNotify.cpp @@ -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)