Signed-off-by: Serge Gautherie winehq-git_serge_180711@gautherie.fr --- dlls/shell32/changenotify.c | 43 ++++++++++++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 13 deletions(-)
diff --git a/dlls/shell32/changenotify.c b/dlls/shell32/changenotify.c index 6c77a6c..6959fb7 100644 --- a/dlls/shell32/changenotify.c +++ b/dlls/shell32/changenotify.c @@ -280,31 +280,47 @@ void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID if(uFlags & ~(SHCNF_TYPE|SHCNF_FLUSH)) FIXME("ignoring unsupported flags: %x\n", uFlags);
- if( ( wEventId & SHCNE_NOITEMEVENTS ) && ( dwItem1 || dwItem2 ) ) + /* FIXME: Either set to NULL or return, not both */ + if ((wEventId & SHCNE_NOITEMEVENTS) && (dwItem1 || dwItem2)) { - TRACE("dwItem1 and dwItem2 are not zero, but should be\n"); - dwItem1 = 0; - dwItem2 = 0; + WARN("dwItem1 and/or dwItem2 are not NULL\n"); + dwItem1 = NULL; + dwItem2 = NULL; return; } - else if( ( wEventId & SHCNE_ONEITEMEVENTS ) && dwItem2 ) + else if ((wEventId & SHCNE_ONEITEMEVENTS) && (!dwItem1 || dwItem2)) { - TRACE("dwItem2 is not zero, but should be\n"); - dwItem2 = 0; + WARN("dwItem1 is NULL and/or dwItem2 is not NULL\n"); + dwItem2 = NULL; + return; + } + else if ((wEventId & SHCNE_SECONDITEMEVENTS) && (dwItem1 || !dwItem2)) + { + WARN("dwItem1 is not NULL and/or dwItem2 is NULL\n"); + dwItem1 = NULL; + return; + } + else if (!dwItem1 || !dwItem2) + { + WARN("dwItem1 and/or dwItem2 are NULL\n"); return; }
- if( ( ( wEventId & SHCNE_NOITEMEVENTS ) && - ( wEventId & ~SHCNE_NOITEMEVENTS ) ) || - ( ( wEventId & SHCNE_ONEITEMEVENTS ) && - ( wEventId & ~SHCNE_ONEITEMEVENTS ) ) || - ( ( wEventId & SHCNE_TWOITEMEVENTS ) && - ( wEventId & ~SHCNE_TWOITEMEVENTS ) ) ) + if (((wEventId & SHCNE_NOITEMEVENTS ) && (wEventId & ~SHCNE_NOITEMEVENTS )) || + ((wEventId & SHCNE_ONEITEMEVENTS ) && (wEventId & ~SHCNE_ONEITEMEVENTS )) || + ((wEventId & SHCNE_SECONDITEMEVENTS) && (wEventId & ~SHCNE_SECONDITEMEVENTS)) || + ((wEventId & SHCNE_TWOITEMEVENTS ) && (wEventId & ~SHCNE_TWOITEMEVENTS ))) { WARN("mutually incompatible events listed\n"); return; }
+ if ((wEventId & SHCNE_SECONDITEMEVENTS)) + { + FIXME("SHChangeNotify with (wEventId & SHCNE_SECONDITEMEVENTS)\n"); + return; + } + /* convert paths in IDLists*/ switch (uFlags & SHCNF_TYPE) { @@ -351,6 +367,7 @@ void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID notify = TRUE; else if( wEventId & ( SHCNE_ONEITEMEVENTS | SHCNE_TWOITEMEVENTS ) ) notify = should_notify( Pidls[0], pidl, subtree ); + /* FIXME: Following if() is masked by previous one */ else if( wEventId & SHCNE_TWOITEMEVENTS ) notify = should_notify( Pidls[1], pidl, subtree ); }
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=65820
Your paranoid android.
=== debian10 (32 bit report) ===
shell32: shlfolder.c:4935: Test failed: MKDIR: Expected wndproc to be called shlfolder.c:4946: Test failed: MKDIR: Expected wndproc to be called shlfolder.c:4935: Test failed: CREATE: Expected wndproc to be called shlfolder.c:4946: Test failed: CREATE: Expected wndproc to be called shlfolder.c:4935: Test failed: RMDIR: Expected wndproc to be called shlfolder.c:4946: Test failed: RMDIR: Expected wndproc to be called shlfolder.c:4935: Test failed: MKDIR: Expected wndproc to be called shlfolder.c:4946: Test failed: MKDIR: Expected wndproc to be called shlfolder.c:4935: Test failed: CREATE: Expected wndproc to be called shlfolder.c:4946: Test failed: CREATE: Expected wndproc to be called shlfolder.c:4935: Test failed: RMDIR: Expected wndproc to be called shlfolder.c:4946: Test failed: RMDIR: Expected wndproc to be called
=== debian10 (32 bit Chinese:China report) ===
shell32: shlfolder.c:4935: Test failed: MKDIR: Expected wndproc to be called shlfolder.c:4946: Test failed: MKDIR: Expected wndproc to be called shlfolder.c:4935: Test failed: CREATE: Expected wndproc to be called shlfolder.c:4946: Test failed: CREATE: Expected wndproc to be called shlfolder.c:4935: Test failed: RMDIR: Expected wndproc to be called shlfolder.c:4946: Test failed: RMDIR: Expected wndproc to be called shlfolder.c:4935: Test failed: MKDIR: Expected wndproc to be called shlfolder.c:4946: Test failed: MKDIR: Expected wndproc to be called shlfolder.c:4935: Test failed: CREATE: Expected wndproc to be called shlfolder.c:4946: Test failed: CREATE: Expected wndproc to be called shlfolder.c:4935: Test failed: RMDIR: Expected wndproc to be called shlfolder.c:4946: Test failed: RMDIR: Expected wndproc to be called
=== debian10 (32 bit WoW report) ===
shell32: shlfolder.c:4935: Test failed: MKDIR: Expected wndproc to be called shlfolder.c:4946: Test failed: MKDIR: Expected wndproc to be called shlfolder.c:4935: Test failed: CREATE: Expected wndproc to be called shlfolder.c:4946: Test failed: CREATE: Expected wndproc to be called shlfolder.c:4935: Test failed: RMDIR: Expected wndproc to be called shlfolder.c:4946: Test failed: RMDIR: Expected wndproc to be called shlfolder.c:4935: Test failed: MKDIR: Expected wndproc to be called shlfolder.c:4946: Test failed: MKDIR: Expected wndproc to be called shlfolder.c:4935: Test failed: CREATE: Expected wndproc to be called shlfolder.c:4946: Test failed: CREATE: Expected wndproc to be called shlfolder.c:4935: Test failed: RMDIR: Expected wndproc to be called shlfolder.c:4946: Test failed: RMDIR: Expected wndproc to be called
=== debian10 (64 bit WoW report) ===
shell32: shlfolder.c:4935: Test failed: MKDIR: Expected wndproc to be called shlfolder.c:4946: Test failed: MKDIR: Expected wndproc to be called shlfolder.c:4935: Test failed: CREATE: Expected wndproc to be called shlfolder.c:4946: Test failed: CREATE: Expected wndproc to be called shlfolder.c:4935: Test failed: RMDIR: Expected wndproc to be called shlfolder.c:4946: Test failed: RMDIR: Expected wndproc to be called shlfolder.c:4935: Test failed: MKDIR: Expected wndproc to be called shlfolder.c:4946: Test failed: MKDIR: Expected wndproc to be called shlfolder.c:4935: Test failed: CREATE: Expected wndproc to be called shlfolder.c:4946: Test failed: CREATE: Expected wndproc to be called shlfolder.c:4935: Test failed: RMDIR: Expected wndproc to be called shlfolder.c:4946: Test failed: RMDIR: Expected wndproc to be called
Wrong. To be Rejected.