From 492b6f0a6f555bc2ee062510ab32e28accd70ac8 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 9 Jun 2005 21:52:20 +0000 Subject: [PATCH] another compilation fix for wxUSE_MIMETYPE==0 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34621 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/dbgrptg.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/generic/dbgrptg.cpp b/src/generic/dbgrptg.cpp index 734054bfca..92a3b55c50 100644 --- a/src/generic/dbgrptg.cpp +++ b/src/generic/dbgrptg.cpp @@ -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()); } } -- 2.45.2