From 854aa1e15df85e23ae1575bcbcfdbfb877bf87b0 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Sat, 21 May 2005 09:53:53 +0000 Subject: [PATCH] Don't check for wildcards if wxSAVE is given. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34214 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/filedlgg.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/generic/filedlgg.cpp b/src/generic/filedlgg.cpp index 14a2ca9324..0cf73c397e 100644 --- a/src/generic/filedlgg.cpp +++ b/src/generic/filedlgg.cpp @@ -1267,16 +1267,19 @@ void wxGenericFileDialog::HandleAction( const wxString &fn ) } #endif // __UNIX__ - if ((filename.Find(wxT('*')) != wxNOT_FOUND) || - (filename.Find(wxT('?')) != wxNOT_FOUND)) + if (!(m_dialogStyle & wxSAVE)) { - if (filename.Find(wxFILE_SEP_PATH) != wxNOT_FOUND) + if ((filename.Find(wxT('*')) != wxNOT_FOUND) || + (filename.Find(wxT('?')) != wxNOT_FOUND)) { - wxMessageBox(_("Illegal file specification."), _("Error"), wxOK | wxICON_ERROR ); + if (filename.Find(wxFILE_SEP_PATH) != wxNOT_FOUND) + { + wxMessageBox(_("Illegal file specification."), _("Error"), wxOK | wxICON_ERROR ); + return; + } + m_list->SetWild( filename ); return; } - m_list->SetWild( filename ); - return; } if (!IsTopMostDir(dir)) -- 2.45.2