[SHELL32]
authorThomas Faber <thomas.faber@reactos.org>
Mon, 17 Aug 2015 08:03:02 +0000 (08:03 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Mon, 17 Aug 2015 08:03:02 +0000 (08:03 +0000)
- Only complain about _OpenDirectory failing if it actually failed
CORE-1171

svn path=/trunk/; revision=68725

reactos/dll/win32/shell32/wine/changenotify.c

index 9d2a2ef..c87e19a 100644 (file)
@@ -250,9 +250,18 @@ SHChangeNotifyRegister(
         item->apidl[i].backBuffer = SHAlloc(BUFFER_SIZE);
         item->apidl[i].overlapped.hEvent = &item->apidl[i];
 
         item->apidl[i].backBuffer = SHAlloc(BUFFER_SIZE);
         item->apidl[i].overlapped.hEvent = &item->apidl[i];
 
-        if (fSources & SHCNRF_InterruptLevel && _OpenDirectory( &item->apidl[i] ))
-            QueueUserAPC(_AddDirectoryProc, m_hThread, (ULONG_PTR) &item->apidl[i] );
-        else ERR("_OpenDirectory Failed\n");
+        if (fSources & SHCNRF_InterruptLevel)
+        {
+            if (_OpenDirectory( &item->apidl[i] ))
+                QueueUserAPC( _AddDirectoryProc, m_hThread, (ULONG_PTR) &item->apidl[i] );
+            else
+            {
+                CHAR buffer[MAX_PATH];
+                if (!SHGetPathFromIDListA( item->apidl[i].pidl, buffer ))
+                    strcpy( buffer, "<unknown>" );
+                ERR("_OpenDirectory failed for %s\n", buffer);
+            }
+        }
 #endif
     }
     item->hwnd = hwnd;
 #endif
     }
     item->hwnd = hwnd;