From: Vadim Zeitlin <vadim@wxwidgets.org> Date: Thu, 3 Dec 2009 16:26:15 +0000 (+0000) Subject: Don't assert if the path is not absolute in wxFileDialog::SetPath(). X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/8f79ece33306d91be746a694f3893906bba67465 Don't assert if the path is not absolute in wxFileDialog::SetPath(). Remove the assert added in r62101 (see #10917), it was wrong as the other ports do not assert in this case. Instead, just ensure that the path we use with the GTK+ native chooser is absolute. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62769 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/gtk/filedlg.cpp b/src/gtk/filedlg.cpp index fb0bfa7735..ace2daddcd 100644 --- a/src/gtk/filedlg.cpp +++ b/src/gtk/filedlg.cpp @@ -369,8 +369,11 @@ void wxFileDialog::SetMessage(const wxString& message) void wxFileDialog::SetPath(const wxString& path) { - wxCHECK_RET(wxIsAbsolutePath(path), " wxFileDialog::SetPath requires an absolute filepath"); - m_fc.SetPath( path ); + // we need an absolute path for GTK native chooser so ensure that we have + // it + wxFileName fn(path); + fn.MakeAbsolute(); + m_fc.SetPath(fn.GetFullPath()); } void wxFileDialog::SetDirectory(const wxString& dir)