From 8ffec97a6eba9e550f6f124081e56533d4acaf80 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Karsten=20Ball=C3=BCder?= Date: Fri, 24 Jul 1998 12:18:23 +0000 Subject: [PATCH] fixed appending of '/' to empty string git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/filedlg.cpp | 2 +- src/gtk1/filedlg.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gtk/filedlg.cpp b/src/gtk/filedlg.cpp index aa05bdac13..4589f3de1a 100644 --- a/src/gtk/filedlg.cpp +++ b/src/gtk/filedlg.cpp @@ -65,7 +65,7 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message, GtkFileSelection *sel = GTK_FILE_SELECTION(m_widget); m_path.Append(m_dir); - if(m_path.Last()!='/') m_path.Append('/'); + if(! m_path.IsEmpty() && m_path.Last()!='/') m_path.Append('/'); m_path.Append(m_fileName); if(m_path.Length()>1) gtk_file_selection_set_filename(sel,m_path); diff --git a/src/gtk1/filedlg.cpp b/src/gtk1/filedlg.cpp index aa05bdac13..4589f3de1a 100644 --- a/src/gtk1/filedlg.cpp +++ b/src/gtk1/filedlg.cpp @@ -65,7 +65,7 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message, GtkFileSelection *sel = GTK_FILE_SELECTION(m_widget); m_path.Append(m_dir); - if(m_path.Last()!='/') m_path.Append('/'); + if(! m_path.IsEmpty() && m_path.Last()!='/') m_path.Append('/'); m_path.Append(m_fileName); if(m_path.Length()>1) gtk_file_selection_set_filename(sel,m_path); -- 2.47.2