diff --git a/src/msw/dirdlg.cpp b/src/msw/dirdlg.cpp index 87328553af..44431a43dd 100644 --- a/src/msw/dirdlg.cpp +++ b/src/msw/dirdlg.cpp @@ -360,25 +360,14 @@ bool InitIFileOpenDialog(const wxString& message, const wxString& defaultPath, wxIID_PPV_ARGS(IShellItem, &folder)); - // Failing to parse the folder name is not really an error, we'll just - // ignore the initial directory in this case, but we should still show - // the dialog. - if ( FAILED(hr) ) - { - if ( hr != HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) ) - { - wxLogApiError(wxS("SHCreateItemFromParsingName"), hr); - return false; - } - } - else // The folder was parsed correctly. + // Failing to parse the folder name or set it is not really an error, + // we'll just ignore the initial directory in this case, but we should + // still show the dialog. + if ( SUCCEEDED(hr) ) { hr = dlg->SetFolder(folder); if ( FAILED(hr) ) - { wxLogApiError(wxS("IFileOpenDialog::SetFolder"), hr); - return false; - } } }