[SHELL32]
[reactos.git] / reactos / dll / win32 / shell32 / wine / changenotify.c
index 9369379..737c4d2 100644 (file)
@@ -173,7 +173,7 @@ static void DeleteNode(LPNOTIFICATIONLIST item)
         TRACE("Not freeing, still %d queued events\n", queued);
         return;
     }
-    TRACE("Freeing for real!\n");
+    TRACE("Freeing for real! %p (%d) \n", item, item->cidl);
 #endif
 
     /* remove item from list */
@@ -693,7 +693,7 @@ BOOL _OpenDirectory(LPNOTIFYREGISTER item)
 static void CALLBACK _RequestTermination(ULONG_PTR arg)
 {
     LPNOTIFYREGISTER item = (LPNOTIFYREGISTER) arg;
-    TRACE("_RequestTermination %p \n", item->hDirectory);
+    TRACE("_RequestTermination %p %p \n", item, item->hDirectory);
     if (!item->hDirectory || item->hDirectory == INVALID_HANDLE_VALUE) return;
 
     CancelIo(item->hDirectory);
@@ -723,6 +723,17 @@ _NotificationCompletion(DWORD dwErrorCode, // completion code
     }
 #endif
 
+#ifdef __REACTOS__
+    /* If the FSD doesn't support directory change notifications, there's no
+     * no need to retry and requeue notification
+     */
+    if (dwErrorCode == ERROR_INVALID_FUNCTION)
+    {
+        WARN("Directory watching not supported\n");
+        goto quit;
+    }
+#endif
+
     /* This likely means overflow, so force whole directory refresh. */
     if (!dwNumberOfBytesTransfered)
     {
@@ -784,7 +795,9 @@ static VOID _BeginRead(LPNOTIFYREGISTER item )
 #ifdef __REACTOS__
     {
 #endif
-        ERR("ReadDirectoryChangesW failed. (%p, %p, %p, %p) Code: %u \n",
+        ERR("ReadDirectoryChangesW failed. (%p, %p, %p, %p, %p, %p) Code: %u \n",
+            item,
+            item->pParent,
             item->hDirectory,
             item->buffer,
             &item->overlapped,