mirror of
https://github.com/reactos/reactos.git
synced 2026-06-01 00:40:26 +08:00
[SHELL32] Improve CChangeNotify::ShouldNotify
Shell change notification was not sent to My Documents. CORE-13950
This commit is contained in:
@@ -537,7 +537,9 @@ BOOL CChangeNotify::DoDelivery(HANDLE hTicket, DWORD dwOwnerPID)
|
||||
BOOL CChangeNotify::ShouldNotify(LPDELITICKET pTicket, LPNOTIFSHARE pShared)
|
||||
{
|
||||
BOOL ret;
|
||||
LPITEMIDLIST pidl, pidl1, pidl2;
|
||||
LPITEMIDLIST pidl, pidl1 = NULL, pidl2 = NULL;
|
||||
WCHAR szPath[MAX_PATH], szPath1[MAX_PATH], szPath2[MAX_PATH];
|
||||
INT cch, cch1, cch2;
|
||||
|
||||
if (!pShared->ibPidl)
|
||||
return TRUE;
|
||||
@@ -559,5 +561,35 @@ BOOL CChangeNotify::ShouldNotify(LPDELITICKET pTicket, LPNOTIFSHARE pShared)
|
||||
ret = TRUE;
|
||||
}
|
||||
|
||||
if (!ret && SHGetPathFromIDListW(pidl, szPath))
|
||||
{
|
||||
PathAddBackslashW(szPath);
|
||||
cch = lstrlenW(szPath);
|
||||
|
||||
if (pidl1 && SHGetPathFromIDListW(pidl1, szPath1))
|
||||
{
|
||||
PathAddBackslashW(szPath1);
|
||||
cch1 = lstrlenW(szPath1);
|
||||
if (cch < cch1)
|
||||
{
|
||||
szPath1[cch] = 0;
|
||||
if (lstrcmpiW(szPath, szPath1) == 0)
|
||||
ret = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ret && pidl2 && SHGetPathFromIDListW(pidl2, szPath2))
|
||||
{
|
||||
PathAddBackslashW(szPath2);
|
||||
cch2 = lstrlenW(szPath2);
|
||||
if (cch < cch2)
|
||||
{
|
||||
szPath2[cch] = 0;
|
||||
if (lstrcmpiW(szPath, szPath2) == 0)
|
||||
ret = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user