From eb0ee6d82f4d9b346de45e92c4d8f7ef1f8ff336 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 17 Jul 2022 19:20:29 +0100 Subject: [PATCH] Do log SHCreateItemFromParsingName() errors Even if we mostly ignore them when they happen, it can still be useful to see them in the debug logs. --- src/msw/dirdlg.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/msw/dirdlg.cpp b/src/msw/dirdlg.cpp index 06e56e7108..9f433c830b 100644 --- a/src/msw/dirdlg.cpp +++ b/src/msw/dirdlg.cpp @@ -392,6 +392,14 @@ HRESULT InitShellItemFromPath(wxCOMPtr& item, const wxString& path) NULL, wxIID_PPV_ARGS(IShellItem, &item) ); + if ( FAILED(hr) ) + { + wxLogApiError + ( + wxString::Format(wxS("SHCreateItemFromParsingName(\"%s\")"), path), + hr + ); + } return hr; }