]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed appending of '/' to empty string
authorKarsten Ballüder <ballueder@usa.net>
Fri, 24 Jul 1998 12:18:23 +0000 (12:18 +0000)
committerKarsten Ballüder <ballueder@usa.net>
Fri, 24 Jul 1998 12:18:23 +0000 (12:18 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/filedlg.cpp
src/gtk1/filedlg.cpp

index aa05bdac13fbc3c21e216fcd3b80b66706397c35..4589f3de1ab70add12d97c3db36d3621c6ee05ce 100644 (file)
@@ -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);
index aa05bdac13fbc3c21e216fcd3b80b66706397c35..4589f3de1ab70add12d97c3db36d3621c6ee05ce 100644 (file)
@@ -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);