summaryrefslogtreecommitdiff
path: root/src/fileselection.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fileselection.c')
-rw-r--r--src/fileselection.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fileselection.c b/src/fileselection.c
index 46d1941d..4cfa0514 100644
--- a/src/fileselection.c
+++ b/src/fileselection.c
@@ -76,7 +76,10 @@ void zenity_fileselection (ZenityData *data, ZenityFileData *file_data)
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);
+ if (file_data->save)
+ gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), basename);
+ else
+ (void) gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (dialog), file_data->uri);
g_free (basename);
}
g_free (dir);
bgstack15