From b108f21cff26568afc16ff57d7e25b7ea4585c8d Mon Sep 17 00:00:00 2001 From: rwst Date: Mon, 10 Jul 2006 17:43:51 +0000 Subject: [PATCH] another attempt at #1502439, another example of ignoring NULL removed --- src/dialogs/filedialog.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/dialogs/filedialog.cpp b/src/dialogs/filedialog.cpp index 6bc56357d..2ca1e3570 100644 --- a/src/dialogs/filedialog.cpp +++ b/src/dialogs/filedialog.cpp @@ -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 -- 2.30.2