Now that shell views can detect external filesystem changes, it doesn't actually matter whether or not SHChangeNotify from copy/paste comes through.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=30752 Signed-off-by: Nigel Baillie metreckk@gmail.com --- dlls/shell32/shlview.c | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-)
diff --git a/dlls/shell32/shlview.c b/dlls/shell32/shlview.c index b31b81664e..e88d1b677d 100644 --- a/dlls/shell32/shlview.c +++ b/dlls/shell32/shlview.c @@ -801,36 +801,22 @@ static LRESULT ShellView_OnCreate(IShellViewImpl *This) hr = IShellFolder_QueryInterface(This->pSFParent, &IID_IPersistFolder2, (LPVOID*)&ppf2); if (hr == S_OK) { - LPITEMIDLIST raw_pidl; + LPITEMIDLIST current_pidl; SHChangeNotifyEntry ntreg;
- hr = IPersistFolder2_GetCurFolder(ppf2, &raw_pidl); + hr = IPersistFolder2_GetCurFolder(ppf2, ¤t_pidl); if(SUCCEEDED(hr)) { - LPITEMIDLIST computer_pidl; - SHGetFolderLocation(NULL,CSIDL_DRIVES,NULL,0,&computer_pidl); - if(ILIsParent(computer_pidl,raw_pidl,FALSE)) - { - /* Normalize the pidl to unixfs to workaround an issue with - * sending notifications on dos paths - */ - WCHAR path[MAX_PATH]; - SHGetPathFromIDListW(raw_pidl,path); - SHParseDisplayName(path,NULL,(LPITEMIDLIST*)&ntreg.pidl,0,NULL); - SHFree(raw_pidl); - } - else - ntreg.pidl = raw_pidl; + ntreg.pidl = current_pidl; ntreg.fRecursive = TRUE; This->hNotify = SHChangeNotifyRegister(This->hWnd, SHCNRF_InterruptLevel, SHCNE_ALLEVENTS, SHV_CHANGE_NOTIFY, 1, &ntreg);
- if (SHGetPathFromIDListW(raw_pidl, This->current_path)) + if (SHGetPathFromIDListW(current_pidl, This->current_path)) This->fs_listener_thread = CreateThread(NULL, 0, ShellView_FsChangeListener, (void *)This, 0, NULL);
- SHFree((LPITEMIDLIST)ntreg.pidl); - SHFree(computer_pidl); + SHFree(current_pidl); } IPersistFolder2_Release(ppf2); }