Reactos

[BROWSEUI] Show virtual folders in the log for SHOpenFolderWindow

+10 -4
+10 -4
dll/win32/browseui/desktopipc.cpp
··· 550 550 HANDLE threadHandle; 551 551 DWORD threadID; 552 552 553 - WCHAR debugStr[MAX_PATH + 1]; 554 - SHGetPathFromIDListW(parameters->directoryPIDL, debugStr); 555 - 556 - TRACE("SHOpenFolderWindow %p(%S)\n", parameters->directoryPIDL, debugStr); 553 + // Only try to convert the pidl when it is going to be printed 554 + if (TRACE_ON(browseui)) 555 + { 556 + WCHAR debugStr[MAX_PATH + 2] = { 0 }; 557 + if (!ILGetDisplayName(parameters->directoryPIDL, debugStr)) 558 + { 559 + debugStr[0] = UNICODE_NULL; 560 + } 561 + TRACE("SHOpenFolderWindow %p(%S)\n", parameters->directoryPIDL, debugStr); 562 + } 557 563 558 564 PIE_THREAD_PARAM_BLOCK paramsCopy = SHCloneIETHREADPARAM(parameters); 559 565