From 6d386ddda5e4552aeda28b104242626ff05b10c5 Mon Sep 17 00:00:00 2001 From: Glynn Foster Date: Thu, 21 Apr 2005 00:56:05 +0000 Subject: Fix for #171838, from Carlos Parra. 2005-04-20 Glynn Foster * src/fileselection.c: Fix for #171838, from Carlos Parra. --- src/fileselection.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/fileselection.c b/src/fileselection.c index 6930437..4e51eec 100644 --- a/src/fileselection.c +++ b/src/fileselection.c @@ -64,7 +64,10 @@ void zenity_fileselection (ZenityData *data, ZenityFileData *file_data) if (file_data->uri) { dir = g_path_get_dirname (file_data->uri); - gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), dir); + + if (g_path_is_absolute (file_data->uri) == TRUE) + gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), dir); + if (file_data->uri[strlen (file_data->uri) - 1] != '/') { basename = g_path_get_basename (file_data->uri); gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), basename); -- cgit v1.2.3-54-g00ecf