https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b3f2ba0522b24473dce2f…
commit b3f2ba0522b24473dce2fc2e488ff64fd7e3f520
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Sun Sep 13 15:02:43 2020 +0200
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Oct 4 19:34:20 2020 +0200
[BROWSEUI] Show virtual folders in the log for SHOpenFolderWindow
---
dll/win32/browseui/desktopipc.cpp | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/dll/win32/browseui/desktopipc.cpp b/dll/win32/browseui/desktopipc.cpp
index 02d60cb488d..4ea4837f8d3 100644
--- a/dll/win32/browseui/desktopipc.cpp
+++ b/dll/win32/browseui/desktopipc.cpp
@@ -550,10 +550,16 @@ extern "C" HRESULT WINAPI
SHOpenFolderWindow(PIE_THREAD_PARAM_BLOCK parameters)
HANDLE threadHandle;
DWORD threadID;
- WCHAR debugStr[MAX_PATH + 1];
- SHGetPathFromIDListW(parameters->directoryPIDL, debugStr);
-
- TRACE("SHOpenFolderWindow %p(%S)\n", parameters->directoryPIDL,
debugStr);
+ // Only try to convert the pidl when it is going to be printed
+ if (TRACE_ON(browseui))
+ {
+ WCHAR debugStr[MAX_PATH + 2] = { 0 };
+ if (!ILGetDisplayName(parameters->directoryPIDL, debugStr))
+ {
+ debugStr[0] = UNICODE_NULL;
+ }
+ TRACE("SHOpenFolderWindow %p(%S)\n", parameters->directoryPIDL,
debugStr);
+ }
PIE_THREAD_PARAM_BLOCK paramsCopy = SHCloneIETHREADPARAM(parameters);