Code

another attempt at #1502439, another example of ignoring NULL removed
authorrwst <rwst@users.sourceforge.net>
Mon, 10 Jul 2006 17:43:51 +0000 (17:43 +0000)
committerrwst <rwst@users.sourceforge.net>
Mon, 10 Jul 2006 17:43:51 +0000 (17:43 +0000)
src/dialogs/filedialog.cpp

index 6bc56357d897b0169c29163dbf8ec7666bf211fd..2ca1e35700a45d16f8348fe9c9bd19aae8523b2f 100644 (file)
@@ -895,7 +895,10 @@ FileOpenDialogImpl::~FileOpenDialogImpl()
 bool
 FileOpenDialogImpl::show()
 {
-    set_current_folder(get_current_folder()); //hack to force initial dir listing
+    Glib::ustring s = Glib::filename_to_utf8 (get_current_folder());
+    if (s.length() == 0) 
+        s = getcwd (NULL, 0);
+    set_current_folder(Glib::filename_from_utf8(s)); //hack to force initial dir listing
     set_modal (TRUE);                      //Window
     sp_transientize((GtkWidget *)gobj());  //Make transient
     gint b = run();                        //Dialog