X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/67a623de6e325179a9124d5dd0a3cd1849d5eba7..9814d926198c75333d972f408fa527f84e9355d3:/src/generic/dbgrptg.cpp diff --git a/src/generic/dbgrptg.cpp b/src/generic/dbgrptg.cpp index 52d43bae35..92a3b55c50 100644 --- a/src/generic/dbgrptg.cpp +++ b/src/generic/dbgrptg.cpp @@ -29,7 +29,7 @@ #include "wx/textctrl.h" #endif // WX_PRECOMP -#if wxUSE_DEBUGREPORT +#if wxUSE_DEBUGREPORT && wxUSE_XML #include "wx/debugrpt.h" @@ -439,13 +439,20 @@ void wxDebugReportDialog::OnOpen(wxCommandEvent& ) // if we don't have place marker for file name in the command... wxString cmd = dlg.GetCommand(); - if ( cmd.find(_T('%')) == wxString::npos ) + if ( !cmd.empty() ) { - // ...add it - cmd += _T(" \"%s\""); +#if wxUSE_MIMETYPE + if ( cmd.find(_T('%')) != wxString::npos ) + { + command = wxFileType::ExpandCommand(cmd, fn.GetFullPath()); + } + else // no %s nor %1 +#endif // wxUSE_MIMETYPE + { + // append the file name to the end + command << cmd << _T(" \"") << fn.GetFullPath() << _T('"'); + } } - - command = wxFileType::ExpandCommand(cmd, fn.GetFullPath()); } }