mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 16:32:59 +00:00
[SHELL32] Improve CChangeNotify::ShouldNotify
Shell change notification was not sent to My Documents. CORE-13950
This commit is contained in:
parent
7bef5b882a
commit
59c48a5d33
1 changed files with 33 additions and 1 deletions
|
@ -537,7 +537,9 @@ BOOL CChangeNotify::DoDelivery(HANDLE hTicket, DWORD dwOwnerPID)
|
||||||
BOOL CChangeNotify::ShouldNotify(LPDELITICKET pTicket, LPNOTIFSHARE pShared)
|
BOOL CChangeNotify::ShouldNotify(LPDELITICKET pTicket, LPNOTIFSHARE pShared)
|
||||||
{
|
{
|
||||||
BOOL ret;
|
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)
|
if (!pShared->ibPidl)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -559,5 +561,35 @@ BOOL CChangeNotify::ShouldNotify(LPDELITICKET pTicket, LPNOTIFSHARE pShared)
|
||||||
ret = TRUE;
|
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;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue